May be used directly to write the TextureData to file (screenshot).
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| protected final GLPixelBuffer. | |
| protected final GLPixelStorageModes | |
| protected GLPixelBuffer | |
| protected final Texture | |
| protected TextureData |
| Access | Constructor and Description |
|---|---|
| public | GLReadBufferUtil(final boolean
true for RGBA readPixels, otherwise RGB readPixels. alpha, final boolean Disclaimer Alpha maybe forced on ES platforms! true if readPixel's TextureData shall be written to a 2d Texture write2Texture)
|
| public | GLReadBufferUtil(final GLPixelBuffer.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public GLPixelStorageModes | |
| public GLPixelBuffer | getPixelBuffer()
Returns the |
| public GLPixelBuffer. | |
| public Texture | Returns: the Texture object filled byreadPixels(GLAutoDrawable, boolean),
if this instance writes to a 2d Texture, otherwise null.
|
| public TextureData | |
| public boolean | |
| public boolean | |
| public boolean | readPixels(final GL
the current GL context object. It's read drawable is being used as the pixel source. gl, final boolean indicates whether to flip the data vertically or not.
The context's drawable mustFlipVertically)GLDrawable#isGLOriented() state
is taken into account.
Vertical flipping is propagated to TextureData
and handled in a efficient manner there (TextureCoordinates and TextureIO writer).Read the drawable's pixels to TextureData and Texture, if requested at construction. |
| public boolean | readPixels(final GL
the current GL context object. It's read drawable is being used as the pixel source. gl, final int readPixel x offset inX, final int readPixel y offset inY, final int optional readPixel width value, used if [1 .. drawable.width], otherwise using drawable.width inWidth, final int optional readPixel height, used if [1 .. drawable.height], otherwise using drawable.height inHeight, final boolean indicates whether to flip the data vertically or not.
The context's drawable mustFlipVertically)GLDrawable#isGLOriented() state
is taken into account.
Vertical flipping is propagated to TextureData
and handled in a efficient manner there (TextureCoordinates and TextureIO writer).Read the drawable's pixels to TextureData and Texture, if requested at construction. |
| protected boolean | readPixelsImpl(final GLDrawable drawable, final GL gl, final int inX, final int inY, final int width, final int height, final boolean mustFlipVertically)
|
| public void | |
| public void |
| hasAlpha | back to summary |
|---|---|
| protected boolean hasAlpha | |
| pixelBufferProvider | back to summary |
|---|---|
| protected final GLPixelBuffer. | |
| psm | back to summary |
|---|---|
| protected final GLPixelStorageModes psm | |
| readPixelBuffer | back to summary |
|---|---|
| protected GLPixelBuffer readPixelBuffer | |
| readTexture | back to summary |
|---|---|
| protected final Texture readTexture | |
| readTextureData | back to summary |
|---|---|
| protected TextureData readTextureData | |
| GLReadBufferUtil | back to summary |
|---|---|
public GLReadBufferUtil(final boolean alpha, final boolean write2Texture)
| |
| GLReadBufferUtil | back to summary |
|---|---|
| public GLReadBufferUtil(final GLPixelBuffer. | |
| dispose | back to summary |
|---|---|
| public void dispose(final GL gl) | |
| getGLPixelStorageModes | back to summary |
|---|---|
| public GLPixelStorageModes getGLPixelStorageModes() | |
| getPixelBuffer | back to summary |
|---|---|
| public GLPixelBuffer getPixelBuffer() Returns the | |
| getPixelBufferProvider | back to summary |
|---|---|
| public GLPixelBuffer. Returns the | |
| getTexture | back to summary |
|---|---|
public Texture getTexture()
| |
| getTextureData | back to summary |
|---|---|
public TextureData getTextureData()
| |
| hasAlpha | back to summary |
|---|---|
| public boolean hasAlpha() | |
| isValid | back to summary |
|---|---|
| public boolean isValid() | |
| readPixels | back to summary |
|---|---|
| public boolean readPixels(final GL gl, final boolean mustFlipVertically) Read the drawable's pixels to TextureData and Texture, if requested at construction.
| |
| readPixels | back to summary |
|---|---|
| public boolean readPixels(final GL gl, final int inX, final int inY, final int inWidth, final int inHeight, final boolean mustFlipVertically) Read the drawable's pixels to TextureData and Texture, if requested at construction.
| |
| readPixelsImpl | back to summary |
|---|---|
| protected boolean readPixelsImpl(final GLDrawable drawable, final GL gl, final int inX, final int inY, final int width, final int height, final boolean mustFlipVertically) | |
| rewindPixelBuffer | back to summary |
|---|---|
| public void rewindPixelBuffer() rewind the raw pixel ByteBuffer | |
| write | back to summary |
|---|---|
| public void write(final File dest) Write the TextureData filled by | |