|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jogamp.opengl.util.awt.AWTGLPixelBuffer.AWTGLPixelBufferProvider
com.jogamp.opengl.util.awt.AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider
public static class AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider
Provider for singleton AWTGLPixelBuffer instances.
Provider instance holds the last AWTGLPixelBuffer instance
allocated.
A new allocation
will return same instance, if a new buffer is not required.
The latter is true if size are compatible, hence allowRowStride should be enabled, if possible.
| Constructor Summary | |
|---|---|
AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider(boolean allowRowStride)
|
|
| Method Summary | |
|---|---|
AWTGLPixelBuffer |
allocate(GL gl,
GLPixelBuffer.GLPixelAttributes pixelAttributes,
int width,
int height,
int depth,
boolean pack,
int minByteSize)
Allocates a new GLPixelBuffer object. |
AWTGLPixelBuffer |
getSingleBuffer(GLPixelBuffer.GLPixelAttributes pixelAttributes)
Return the last allocated AWTGLPixelBuffer w/ GLPixelAttributes#componentCount. |
AWTGLPixelBuffer |
initSingleton(int componentCount,
int width,
int height,
int depth,
boolean pack)
Initializes the single AWTGLPixelBuffer w/ a given size, if not yet allocated. |
| Methods inherited from class com.jogamp.opengl.util.awt.AWTGLPixelBuffer.AWTGLPixelBufferProvider |
|---|
getAllowRowStride, getAttributes |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.jogamp.opengl.util.GLPixelBuffer.GLPixelBufferProvider |
|---|
getAllowRowStride, getAttributes |
| Constructor Detail |
|---|
public AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider(boolean allowRowStride)
allowRowStride - If true, allow row-stride, otherwise not. See GLPixelBuffer.requiresNewBuffer(GL, int, int, int).| Method Detail |
|---|
public AWTGLPixelBuffer allocate(GL gl,
GLPixelBuffer.GLPixelAttributes pixelAttributes,
int width,
int height,
int depth,
boolean pack,
int minByteSize)
GLPixelBuffer object.
Being called to gather the initial GLPixelBuffer,
or a new replacement GLPixelBuffer if GLPixelBuffer.requiresNewBuffer(GL, int, int, int).
The minimum required remaining byte size equals to minByteSize, if > 0,
otherwise utilize GLBuffers.sizeof(GL, int[], int, int, int, int, int, boolean)
to calculate it.
Returns an array backed IntBuffer of size
width*height*SIZEOF_INT.Returns an array backed
IntBufferof sizewidth*height*SIZEOF_INT.
allocate in interface GLPixelBuffer.GLPixelBufferProviderallocate in class AWTGLPixelBuffer.AWTGLPixelBufferProvidergl - the corresponding current GL context objectpixelAttributes - the desired GLPixelBuffer.GLPixelAttributeswidth - in pixelsheight - in pixelsdepth - in pixelspack - true for read mode GPU -> CPU, otherwise false for write mode CPU -> GPUminByteSize - if > 0, the pre-calculated minimum byte-size for the resulting buffer, otherwise ignore.public AWTGLPixelBuffer getSingleBuffer(GLPixelBuffer.GLPixelAttributes pixelAttributes)
allocated AWTGLPixelBuffer w/ GLPixelAttributes#componentCount.
getSingleBuffer in interface GLPixelBuffer.SingletonGLPixelBufferProvider
public AWTGLPixelBuffer initSingleton(int componentCount,
int width,
int height,
int depth,
boolean pack)
AWTGLPixelBuffer w/ a given size, if not yet allocated.
initSingleton in interface GLPixelBuffer.SingletonGLPixelBufferProviderAWTGLPixelBuffer, or null if already allocated.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||