public static interface GLPixelBuffer.GLPixelBufferProvider
GLPixelBuffer.GLPixelAttributes and memory buffer to produce TextureData.| Modifier and Type | Method and Description |
|---|---|
GLPixelBuffer |
allocate(GL gl,
PixelFormat.Composition hostPixComp,
GLPixelBuffer.GLPixelAttributes pixelAttributes,
boolean pack,
int width,
int height,
int depth,
int minByteSize)
Allocates a new
GLPixelBuffer object. |
boolean |
getAllowRowStride()
|
GLPixelBuffer.GLPixelAttributes |
getAttributes(GL gl,
int componentCount,
boolean pack)
|
PixelFormat.Composition |
getHostPixelComp(GLProfile glp,
int componentCount)
Returns the host
PixelFormat.Composition matching GL and componentCount
if required by implementation, otherwise null. |
boolean getAllowRowStride()
GLPixelBuffer.GLPixelAttributes getAttributes(GL gl, int componentCount, boolean pack)
gl - the corresponding current GL 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.PixelFormat.Composition getHostPixelComp(GLProfile glp, int componentCount)
PixelFormat.Composition matching GL and componentCount
if required by implementation, otherwise null.glp - the corresponding current GL context objectcomponentCount - RGBA component count, i.e. 1 (luminance, alpha or red), 3 (RGB) or 4 (RGBA)GLPixelBuffer allocate(GL gl, PixelFormat.Composition hostPixComp, GLPixelBuffer.GLPixelAttributes pixelAttributes, boolean pack, int width, int height, int depth, int minByteSize)
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 objecthostPixComp - 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 GLPixelBuffer.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 pixelsheight - in pixelsdepth - in pixelsminByteSize - if > 0, the pre-calculated minimum byte-size for the resulting buffer, otherwise ignore.getHostPixelComp(GLProfile, int),
getAttributes(GL, int, boolean)Copyright 2010 JogAmp Community.