|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
GLReadBufferUtil specialization allowing to read out a frambuffer to an AWT BufferedImage utilizing AWTPixelBufferProviderInt for further AWT processing.
More...
Public Member Functions | |
| AWTGLReadBufferUtil (final GLProfile glp, final boolean requestAlpha) | |
| AWTGLPixelBuffer | getAWTGLPixelBuffer () |
Returns the AWTGLPixelBuffer, as filled by previous call to readPixels(GL, int, int, int, int, boolean). More... | |
| BufferedImage | readPixelsToBufferedImage (final GL gl, final boolean awtOrientation) |
Read the drawable's pixels to TextureData and Texture, if requested at construction, and returns an aligned BufferedImage. More... | |
| BufferedImage | readPixelsToBufferedImage (final GL gl, final int inX, final int inY, final int inWidth, final int inHeight, final boolean awtOrientation) |
Read the drawable's pixels to TextureData and Texture, if requested at construction, and returns an aligned BufferedImage. More... | |
Public Member Functions inherited from com.jogamp.opengl.util.GLReadBufferUtil | |
| GLReadBufferUtil (final boolean requestAlpha, final boolean write2Texture) | |
Using the default GLPixelBuffer: GLPixelBuffer#defaultProviderNoRowStride. More... | |
| GLReadBufferUtil (final GLPixelBufferProvider pixelBufferProvider, final boolean requestAlpha, final boolean write2Texture) | |
| void | setReadBuffer (final int name) |
| GLPixelBufferProvider | getPixelBufferProvider () |
Returns the GLPixelBufferProvider used by this instance. More... | |
| boolean | isValid () |
| boolean | hasAlpha () |
| Returns true if the OpenGL read data contains alpha. More... | |
| GLPixelStorageModes | getGLPixelStorageModes () |
| GLPixelBuffer | getPixelBuffer () |
Returns the GLPixelBuffer, created and filled by readPixels(GLAutoDrawable, boolean). More... | |
| void | rewindPixelBuffer () |
| rewind the raw pixel ByteBuffer More... | |
| TextureData | getTextureData () |
| Texture | getTexture () |
| void | write (final File dest) |
Write the TextureData filled by readPixels(GLAutoDrawable, boolean) to file. More... | |
| boolean | readPixels (final GL gl, final boolean mustFlipVertically) |
| Read the drawable's pixels to TextureData and Texture, if requested at construction. More... | |
| 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. More... | |
| void | dispose (final GL gl) |
Additional Inherited Members | |
Protected Member Functions inherited from com.jogamp.opengl.util.GLReadBufferUtil | |
| boolean | readPixelsImpl (final GLDrawable drawable, final GL gl, final int inX, final int inY, final int width, final int height, final boolean mustFlipVertically) |
Protected Attributes inherited from com.jogamp.opengl.util.GLReadBufferUtil | |
| final GLPixelBufferProvider | pixelBufferProvider |
| final Texture | readTexture |
| final GLPixelStorageModes | psm |
| final boolean | alphaRequested |
| boolean | hasAlpha |
| GLPixelBuffer | readPixelBuffer = null |
| TextureData | readTextureData = null |
| int | readBuffer = -1 |
GLReadBufferUtil specialization allowing to read out a frambuffer to an AWT BufferedImage utilizing AWTPixelBufferProviderInt for further AWT processing.
Definition at line 44 of file AWTGLReadBufferUtil.java.
| com.jogamp.opengl.util.awt.AWTGLReadBufferUtil.AWTGLReadBufferUtil | ( | final GLProfile | glp, |
| final boolean | requestAlpha | ||
| ) |
Using the AWT GLPixelBuffer: AWTGLPixelBuffer.AWTGLPixelBufferProvider, always using alpha on OpenGL operations.
The host PixelFormat will be a 32bit INT compatible to AWT, capable to store the GL RGBA read data, regardless whether AWT utilizes the alpha component.
| requestAlpha | true for RGBA readPixels, otherwise RGB readPixels. Disclaimer: hasAlpha()==true is forced due to the used AWTGLPixelBuffer.AWTGLPixelBufferProvider when calling readPixels. |
Definition at line 55 of file AWTGLReadBufferUtil.java.
| AWTGLPixelBuffer com.jogamp.opengl.util.awt.AWTGLReadBufferUtil.getAWTGLPixelBuffer | ( | ) |
Returns the AWTGLPixelBuffer, as filled by previous call to readPixels(GL, int, int, int, int, boolean).
Definition at line 62 of file AWTGLReadBufferUtil.java.
| BufferedImage com.jogamp.opengl.util.awt.AWTGLReadBufferUtil.readPixelsToBufferedImage | ( | final GL | gl, |
| final boolean | awtOrientation | ||
| ) |
Read the drawable's pixels to TextureData and Texture, if requested at construction, and returns an aligned BufferedImage.
| gl | the current GL context object. It's read drawable is being used as the pixel source. |
| awtOrientation | flips the data vertically if true. The context's drawable GLDrawable#isGLOriented() state is taken into account. Vertical flipping is propagated to TextureData and handled in a efficient manner there (TextureCoordinates and TextureIO writer). |
Definition at line 76 of file AWTGLReadBufferUtil.java.
| BufferedImage com.jogamp.opengl.util.awt.AWTGLReadBufferUtil.readPixelsToBufferedImage | ( | final GL | gl, |
| final int | inX, | ||
| final int | inY, | ||
| final int | inWidth, | ||
| final int | inHeight, | ||
| final boolean | awtOrientation | ||
| ) |
Read the drawable's pixels to TextureData and Texture, if requested at construction, and returns an aligned BufferedImage.
| gl | the current GL context object. It's read drawable is being used as the pixel source. |
| inX | readPixel x offset |
| inY | readPixel y offset |
| inWidth | optional readPixel width value, used if [1 .. drawable.width], otherwise using drawable.width |
| inHeight | optional readPixel height, used if [1 .. drawable.height], otherwise using drawable.height |
| awtOrientation | flips the data vertically if true. The context's drawable GLDrawable#isGLOriented() state is taken into account. Vertical flipping is propagated to TextureData and handled in a efficient manner there (TextureCoordinates and TextureIO writer). |
Definition at line 96 of file AWTGLReadBufferUtil.java.