|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Provider for singleton AWTGLPixelBuffer instances.
More...
Public Member Functions | |||||||||||||||||
| SingleAWTGLPixelBufferProvider (final boolean allowRowStride) | |||||||||||||||||
| AWTGLPixelBuffer | allocate (final GL gl, PixelFormat.Composition hostPixComp, final GLPixelAttributes pixelAttributes, final boolean pack, final int width, final int height, final int depth, final int minByteSize) | ||||||||||||||||
Allocates a new GLPixelBuffer object.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.
IntBuffer of size width*height* More... | |||||||||||||||||
| AWTGLPixelBuffer | getSingleBuffer (final PixelFormat.Composition hostPixelComp, final GLPixelAttributes pixelAttributes, final boolean pack) | ||||||||||||||||
Return the last allocated AWTGLPixelBuffer, if compatible w/ the given PixelFormat.Composition and GLPixelAttributes. More... | |||||||||||||||||
| AWTGLPixelBuffer | initSingleton (final GLProfile glp, final int componentCount, final boolean pack, final int width, final int height, final int depth) | ||||||||||||||||
Initializes the single AWTGLPixelBuffer w/ a given size, if not yet allocated. More... | |||||||||||||||||
| void | dispose () | ||||||||||||||||
| Dispose all resources. More... | |||||||||||||||||
Public Member Functions inherited from com.jogamp.opengl.util.awt.AWTGLPixelBuffer.AWTGLPixelBufferProvider | |||||||||||||||||
| AWTGLPixelBufferProvider (final boolean allowRowStride) | |||||||||||||||||
| boolean | getAllowRowStride () | ||||||||||||||||
Allow GL2ES3#GL_PACK_ROW_LENGTH, or GL2ES2#GL_UNPACK_ROW_LENGTH. More... | |||||||||||||||||
| GLPixelAttributes | getAttributes (final GL gl, final int componentCount, final boolean pack) | ||||||||||||||||
Returns RGB[A] GLPixelAttributes matching GL, componentCount and pack. More... | |||||||||||||||||
| GLPixelAttributes | getAttributes (final GLProfile glp, final int componentCount) | ||||||||||||||||
| PixelFormat.Composition | getHostPixelComp (final GLProfile glp, final int componentCount) | ||||||||||||||||
Returns the host PixelFormat.Composition matching GL and componentCount if required by implementation, otherwise null.
| |||||||||||||||||
| int | getAWTFormat (final GLProfile glp, final int componentCount) | ||||||||||||||||
| Returns one of. More... | |||||||||||||||||
| PixelFormat | getAWTPixelFormat (final GLProfile glp, final int componentCount) | ||||||||||||||||
| AWTGLPixelBuffer | allocate (final GL gl, final PixelFormat.Composition hostPixComp, final GLPixelAttributes pixelAttributes, final boolean pack, final int width, final int height, final int depth, final int minByteSize) | ||||||||||||||||
Allocates a new GLPixelBuffer object.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.
| |||||||||||||||||
| boolean | getAllowRowStride () | ||||||||||||||||
Allow GL2ES3#GL_PACK_ROW_LENGTH, or GL2ES2#GL_UNPACK_ROW_LENGTH. More... | |||||||||||||||||
| GLPixelAttributes | getAttributes (GL gl, int componentCount, boolean pack) | ||||||||||||||||
Returns RGB[A] GLPixelAttributes matching GL, componentCount and pack. More... | |||||||||||||||||
| PixelFormat.Composition | getHostPixelComp (final GLProfile glp, final int componentCount) | ||||||||||||||||
Returns the host PixelFormat.Composition matching GL and componentCount if required by implementation, otherwise null. More... | |||||||||||||||||
| GLPixelBuffer | allocate (GL gl, PixelFormat.Composition hostPixComp, GLPixelAttributes pixelAttributes, boolean pack, int width, int height, int depth, int minByteSize) | ||||||||||||||||
Allocates a new GLPixelBuffer object. More... | |||||||||||||||||
| GLPixelBuffer | allocate (GL gl, PixelFormat.Composition hostPixComp, GLPixelAttributes pixelAttributes, boolean pack, int width, int height, int depth, int minByteSize) | ||||||||||||||||
Allocates a new GLPixelBuffer object.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.
| |||||||||||||||||
| GLPixelBuffer | getSingleBuffer (PixelFormat.Composition hostPixelComp, GLPixelAttributes pixelAttributes, boolean pack) | ||||||||||||||||
Return the last allocated GLPixelBuffer matching the given parameter. More... | |||||||||||||||||
| GLPixelBuffer | initSingleton (GLProfile glp, int componentCount, boolean pack, int width, int height, int depth) | ||||||||||||||||
Initializes the single GLPixelBuffer w/ a given size, if not yet allocated. More... | |||||||||||||||||
| void | dispose () | ||||||||||||||||
| Dispose all resources. More... | |||||||||||||||||
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.
Definition at line 257 of file AWTGLPixelBuffer.java.
| com.jogamp.opengl.util.awt.AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider.SingleAWTGLPixelBufferProvider | ( | final boolean | allowRowStride | ) |
| allowRowStride | If true, allow row-stride, otherwise not. See AWTGLPixelBuffer#requiresNewBuffer(GL, int, int, int). |
Definition at line 271 of file AWTGLPixelBuffer.java.
| AWTGLPixelBuffer com.jogamp.opengl.util.awt.AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider.allocate | ( | final GL | gl, |
| PixelFormat.Composition | hostPixComp, | ||
| final GLPixelAttributes | pixelAttributes, | ||
| final boolean | pack, | ||
| final int | width, | ||
| final int | height, | ||
| final int | depth, | ||
| final int | minByteSize | ||
| ) |
Allocates a new GLPixelBuffer object.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.
| gl | the corresponding current GL context object |
| hostPixComp | host pixel format, i.e. of the source or sink depending on pack, e.g. fetched via getHostPixelComp(GLProfile, int). If null, pixelAttributes instance maybe used or an exception is thrown, depending on implementation semantics. |
| pixelAttributes | the desired GLPixelAttributes, e.g. fetched via getAttributes(GL, int, boolean) |
| pack | true for read mode GPU -> CPU, e.g. glReadPixels. false for write mode CPU -> GPU, e.g. glTexImage2D. |
| width | in pixels |
| height | in pixels |
| depth | in pixels |
| minByteSize | if > 0, the pre-calculated minimum byte-size for the resulting buffer, otherwise ignore. |
IntBuffer of size width*height* SIZEOF_INT.
Returns an array backed IntBuffer of size
width*height* SIZEOF_INT.
Reimplemented from com.jogamp.opengl.util.awt.AWTGLPixelBuffer.AWTGLPixelBufferProvider.
Definition at line 282 of file AWTGLPixelBuffer.java.
| void com.jogamp.opengl.util.awt.AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider.dispose | ( | ) |
Dispose all resources.
Implements com.jogamp.opengl.util.GLPixelBuffer.SingletonGLPixelBufferProvider.
Definition at line 342 of file AWTGLPixelBuffer.java.
| AWTGLPixelBuffer com.jogamp.opengl.util.awt.AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider.getSingleBuffer | ( | final PixelFormat.Composition | hostPixelComp, |
| final GLPixelAttributes | pixelAttributes, | ||
| final boolean | pack | ||
| ) |
Return the last allocated AWTGLPixelBuffer, if compatible w/ the given PixelFormat.Composition and GLPixelAttributes.
Implements com.jogamp.opengl.util.GLPixelBuffer.SingletonGLPixelBufferProvider.
Definition at line 317 of file AWTGLPixelBuffer.java.
| AWTGLPixelBuffer com.jogamp.opengl.util.awt.AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider.initSingleton | ( | final GLProfile | glp, |
| final int | componentCount, | ||
| final boolean | pack, | ||
| final int | width, | ||
| final int | height, | ||
| final int | depth | ||
| ) |
Initializes the single AWTGLPixelBuffer w/ a given size, if not yet allocated.
AWTGLPixelBuffer, or null if already allocated. Implements com.jogamp.opengl.util.GLPixelBuffer.SingletonGLPixelBufferProvider.
Definition at line 326 of file AWTGLPixelBuffer.java.