|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.rsl.konrad.cuda.JCudaDriverTextureSample
public class JCudaDriverTextureSample
A sample illustrating how to use textures with JCuda. This program uses
the CUBIN file that is created by the "volumeRender" program from the
NVIDIA CUDA samples web site.
The program loads an 8 bit RAW volume data set and copies it into a
3D texture. The texture is accessed by the kernel to render an image
of the volume data. The resulting image is written into a pixel
buffer object (PBO) which is then displayed using JOGL.
Constructor Summary | |
---|---|
JCudaDriverTextureSample(byte[] volumeData,
int sizeX,
int sizeY,
int sizeZ,
boolean stereoMode)
Creates a new JCudaTextureSample that displays the given volume data, which has the specified size. |
Method Summary | |
---|---|
void |
display(javax.media.opengl.GLAutoDrawable drawable)
Implementation of GLEventListener: Called when the given GLAutoDrawable is to be displayed. |
void |
displayChanged(javax.media.opengl.GLAutoDrawable drawable,
boolean modeChanged,
boolean deviceChanged)
Implementation of GLEventListener - not used |
void |
init(javax.media.opengl.GLAutoDrawable drawable)
Implementation of GLEventListener: Called to initialize the GLAutoDrawable. |
static void |
main(java.lang.String[] args)
Entry point for this sample. |
void |
reshape(javax.media.opengl.GLAutoDrawable drawable,
int x,
int y,
int width,
int height)
Implementation of GLEventListener: Called then the GLAutoDrawable was reshaped |
void |
start()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JCudaDriverTextureSample(byte[] volumeData, int sizeX, int sizeY, int sizeZ, boolean stereoMode)
volumeData
- The volume datasizeX
- The size of the data set in X directionsizeY
- The size of the data set in Y directionsizeZ
- The size of the data set in Z directionstereoMode
- Whether stereo mode should be usedMethod Detail |
---|
public static void main(java.lang.String[] args)
args
- not usedpublic void start()
public void init(javax.media.opengl.GLAutoDrawable drawable)
init
in interface javax.media.opengl.GLEventListener
public void display(javax.media.opengl.GLAutoDrawable drawable)
display
in interface javax.media.opengl.GLEventListener
public void reshape(javax.media.opengl.GLAutoDrawable drawable, int x, int y, int width, int height)
reshape
in interface javax.media.opengl.GLEventListener
public void displayChanged(javax.media.opengl.GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged)
displayChanged
in interface javax.media.opengl.GLEventListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |