JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.opengl.util.GLPixelBuffer.DefaultGLPixelBufferProvider Class Reference
Inheritance diagram for com.jogamp.opengl.util.GLPixelBuffer.DefaultGLPixelBufferProvider:
Collaboration diagram for com.jogamp.opengl.util.GLPixelBuffer.DefaultGLPixelBufferProvider:

Public Member Functions

 DefaultGLPixelBufferProvider (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...
 
PixelFormat.Composition getHostPixelComp (final GLProfile glp, final int componentCount)
 Returns the host PixelFormat.Composition matching GL and componentCount if required by implementation, otherwise null.
Parameters
glpthe corresponding current GL context object
componentCountRGBA component count, i.e. 1 (luminance, alpha or red), 3 (RGB) or 4 (RGBA)
More...
 
GLPixelBuffer 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.
Parameters
glthe corresponding current GL context object
hostPixComphost 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.
pixelAttributesthe desired GLPixelAttributes, e.g. fetched via getAttributes(GL, int, boolean)
packtrue for read mode GPU -> CPU, e.g. glReadPixels. false for write mode CPU -> GPU, e.g. glTexImage2D.
widthin pixels
heightin pixels
depthin pixels
minByteSizeif > 0, the pre-calculated minimum byte-size for the resulting buffer, otherwise ignore.
See also
getHostPixelComp(GLProfile, int)
getAttributes(GL, int, boolean)
More...
 
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...
 

Detailed Description

Definition at line 157 of file GLPixelBuffer.java.

Constructor & Destructor Documentation

◆ DefaultGLPixelBufferProvider()

com.jogamp.opengl.util.GLPixelBuffer.DefaultGLPixelBufferProvider.DefaultGLPixelBufferProvider ( final boolean  allowRowStride)
Parameters
allowRowStrideIf true, allow row-stride, otherwise not. See getAllowRowStride() and GLPixelBuffer#requiresNewBuffer(GL, int, int, int).

Definition at line 164 of file GLPixelBuffer.java.

Member Function Documentation

◆ allocate()

GLPixelBuffer com.jogamp.opengl.util.GLPixelBuffer.DefaultGLPixelBufferProvider.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.

Parameters
glthe corresponding current GL context object
hostPixComphost 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.
pixelAttributesthe desired GLPixelAttributes, e.g. fetched via getAttributes(GL, int, boolean)
packtrue for read mode GPU -> CPU, e.g. glReadPixels. false for write mode CPU -> GPU, e.g. glTexImage2D.
widthin pixels
heightin pixels
depthin pixels
minByteSizeif > 0, the pre-calculated minimum byte-size for the resulting buffer, otherwise ignore.
See also
getHostPixelComp(GLProfile, int)
getAttributes(GL, int, boolean)

Returns an NIO ByteBuffer.

Implements com.jogamp.opengl.util.GLPixelBuffer.GLPixelBufferProvider.

Definition at line 199 of file GLPixelBuffer.java.

Here is the call graph for this function:

◆ getAllowRowStride()

boolean com.jogamp.opengl.util.GLPixelBuffer.DefaultGLPixelBufferProvider.getAllowRowStride ( )

Allow GL2ES3#GL_PACK_ROW_LENGTH, or GL2ES2#GL_UNPACK_ROW_LENGTH.

Implements com.jogamp.opengl.util.GLPixelBuffer.GLPixelBufferProvider.

Definition at line 169 of file GLPixelBuffer.java.

Here is the caller graph for this function:

◆ getAttributes()

GLPixelAttributes com.jogamp.opengl.util.GLPixelBuffer.DefaultGLPixelBufferProvider.getAttributes ( final GL  gl,
final int  componentCount,
final boolean  pack 
)

Returns RGB[A] GLPixelAttributes matching GL, componentCount and pack.

Parameters
glthe corresponding current GL context object
componentCountRGBA component count, i.e. 1 (luminance, alpha or red), 3 (RGB) or 4 (RGBA)
packtrue for read mode GPU -> CPU, e.g. glReadPixels. false for write mode CPU -> GPU, e.g. glTexImage2D.

Implements com.jogamp.opengl.util.GLPixelBuffer.GLPixelBufferProvider.

Definition at line 172 of file GLPixelBuffer.java.

Here is the call graph for this function:

◆ getHostPixelComp()

PixelFormat.Composition com.jogamp.opengl.util.GLPixelBuffer.DefaultGLPixelBufferProvider.getHostPixelComp ( final GLProfile  glp,
final int  componentCount 
)

Returns the host PixelFormat.Composition matching GL and componentCount if required by implementation, otherwise null.

Parameters
glpthe corresponding current GL context object
componentCountRGBA component count, i.e. 1 (luminance, alpha or red), 3 (RGB) or 4 (RGBA)

Returns null!

Implements com.jogamp.opengl.util.GLPixelBuffer.GLPixelBufferProvider.

Definition at line 188 of file GLPixelBuffer.java.


The documentation for this class was generated from the following file: