Package com.jogamp.opengl.util
Interface GLPixelBuffer.GLPixelBufferProvider
-
- All Known Subinterfaces:
GLPixelBuffer.SingletonGLPixelBufferProvider
- All Known Implementing Classes:
AWTGLPixelBuffer.AWTGLPixelBufferProvider
,AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider
,GLPixelBuffer.DefaultGLPixelBufferProvider
- Enclosing class:
- GLPixelBuffer
public static interface GLPixelBuffer.GLPixelBufferProvider
Allows user to interface with another toolkit to defineGLPixelBuffer.GLPixelAttributes
and memory buffer to produceTextureData
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GLPixelBuffer
allocate(GL gl, PixelFormat.Composition hostPixComp, GLPixelBuffer.GLPixelAttributes pixelAttributes, boolean pack, int width, int height, int depth, int minByteSize)
Allocates a newGLPixelBuffer
object.boolean
getAllowRowStride()
GLPixelBuffer.GLPixelAttributes
getAttributes(GL gl, int componentCount, boolean pack)
PixelFormat.Composition
getHostPixelComp(GLProfile glp, int componentCount)
Returns the hostPixelFormat.Composition
matchingGL
andcomponentCount
if required by implementation, otherwisenull
.
-
-
-
Method Detail
-
getAllowRowStride
boolean getAllowRowStride()
-
getAttributes
GLPixelBuffer.GLPixelAttributes getAttributes(GL gl, int componentCount, boolean pack)
- Parameters:
gl
- the corresponding currentGL
context objectcomponentCount
- RGBA component count, i.e. 1 (luminance, alpha or red), 3 (RGB) or 4 (RGBA)pack
-true
for read mode GPU -> CPU, e.g.glReadPixels
.false
for write mode CPU -> GPU, e.g.glTexImage2D
.
-
getHostPixelComp
PixelFormat.Composition getHostPixelComp(GLProfile glp, int componentCount)
Returns the hostPixelFormat.Composition
matchingGL
andcomponentCount
if required by implementation, otherwisenull
.- Parameters:
glp
- the corresponding currentGL
context objectcomponentCount
- RGBA component count, i.e. 1 (luminance, alpha or red), 3 (RGB) or 4 (RGBA)
-
allocate
GLPixelBuffer allocate(GL gl, PixelFormat.Composition hostPixComp, GLPixelBuffer.GLPixelAttributes pixelAttributes, boolean pack, int width, int height, int depth, int minByteSize)
Allocates a newGLPixelBuffer
object.The minimum required
remaining
byte size equals tominByteSize
, if > 0, otherwise utilizeGLBuffers.sizeof(GL, int[], int, int, int, int, int, boolean)
to calculate it.- Parameters:
gl
- the corresponding currentGL
context objecthostPixComp
- hostpixel format
, i.e. of the source or sink depending onpack
, e.g. fetched viagetHostPixelComp(GLProfile, int)
. Ifnull
,pixelAttributes
instance maybe used or an exception is thrown, depending on implementation semantics.pixelAttributes
- the desiredGLPixelBuffer.GLPixelAttributes
, e.g. fetched viagetAttributes(GL, int, boolean)
pack
-true
for read mode GPU -> CPU, e.g.glReadPixels
.false
for write mode CPU -> GPU, e.g.glTexImage2D
.width
- in pixelsheight
- in pixelsdepth
- in pixelsminByteSize
- if > 0, the pre-calculated minimum byte-size for the resulting buffer, otherwise ignore.- See Also:
getHostPixelComp(GLProfile, int)
,getAttributes(GL, int, boolean)
-
-