|
JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java (public API).
|
AWT GLPixelBuffer backed by an BufferedImage of type BufferedImage#TYPE_INT_ARGB or BufferedImage#TYPE_INT_RGB.
More...
Classes | |
| class | AWTGLPixelBufferProvider |
Provider for AWTGLPixelBuffer instances. More... | |
| class | SingleAWTGLPixelBufferProvider |
Provider for singleton AWTGLPixelBuffer instances. More... | |
Public Member Functions | |
| AWTGLPixelBuffer (final PixelFormat.Composition hostPixelComp, final GLPixelAttributes pixelAttributes, final boolean pack, final int awtFormat, final int width, final int height, final int depth, final BufferedImage image, final Buffer buffer, final boolean allowRowStride) | |
| final PixelFormat.Composition | getHostPixelComp () |
| final int | getAWTFormat () |
| void | dispose () |
| Dispose resources. More... | |
| BufferedImage | getAlignedImage (final int width, final int height) throws IllegalArgumentException |
Returns a width- and height-aligned image representation sharing data w/ image. More... | |
| final boolean | isDataBufferSource (final BufferedImage imageU) |
| StringBuilder | toString (StringBuilder sb) |
| String | toString () |
Public Member Functions inherited from com.jogamp.opengl.util.GLPixelBuffer | |
| StringBuilder | toString (StringBuilder sb) |
| String | toString () |
| GLPixelBuffer (final GLPixelAttributes pixelAttributes, final boolean pack, final int width, final int height, final int depth, final Buffer buffer, final boolean allowRowStride) | |
| final boolean | getAllowRowStride () |
Allow GL2ES3#GL_PACK_ROW_LENGTH, or GL2ES2#GL_UNPACK_ROW_LENGTH. More... | |
| boolean | isValid () |
Is not disposed and has byteSize > 0. More... | |
| Buffer | rewind () |
See Buffer#rewind(). More... | |
| int | position () |
Returns the byte position of the buffer. More... | |
| Buffer | position (final int bytePos) |
Sets the byte position of the buffer. More... | |
| int | capacity () |
Returns the byte capacity of the buffer. More... | |
| int | limit () |
Returns the byte limit of the buffer. More... | |
| Buffer | flip () |
See Buffer#flip(). More... | |
| Buffer | clear () |
See Buffer#clear(). More... | |
| boolean | requiresNewBuffer (final GL gl, final int newWidth, final int newHeight, int newByteSize) |
Returns true, if invalid or implementation requires a new buffer based on the new size due to pixel alignment or byte size, otherwise false. More... | |
| void | dispose () |
| Dispose resources. More... | |
Public Attributes | |
| final BufferedImage | image |
The underlying BufferedImage. More... | |
Public Attributes inherited from com.jogamp.opengl.util.GLPixelBuffer | |
| final GLPixelAttributes | pixelAttributes |
The GLPixelAttributes. More... | |
| final int | width |
Width in pixels, representing buffer's byteSize. More... | |
| final int | height |
Height in pixels, representing buffer's byteSize. More... | |
| final int | depth |
| Depth in pixels. More... | |
| final boolean | pack |
| Data packing direction. More... | |
| final int | byteSize |
| Byte size of the buffer. More... | |
| final Buffer | buffer |
| Buffer holding the pixel data. More... | |
| final int | bufferElemSize |
| Buffer element size in bytes. More... | |
| final boolean | allowRowStride |
Allow GL2ES3#GL_PACK_ROW_LENGTH, or GL2ES2#GL_UNPACK_ROW_LENGTH. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from com.jogamp.opengl.util.GLPixelBuffer | |
| static final GLPixelBufferProvider | defaultProviderNoRowStride = new DefaultGLPixelBufferProvider(false) |
Default GLPixelBufferProvider with GLPixelBufferProvider#getAllowRowStride() == false, utilizing best match for GLPixelAttributes and allocating a ByteBuffer. More... | |
| static final GLPixelBufferProvider | defaultProviderWithRowStride = new DefaultGLPixelBufferProvider(true) |
Default GLPixelBufferProvider with GLPixelBufferProvider#getAllowRowStride() == true, utilizing best match for GLPixelAttributes and allocating a ByteBuffer. More... | |
AWT GLPixelBuffer backed by an BufferedImage of type BufferedImage#TYPE_INT_ARGB or BufferedImage#TYPE_INT_RGB.
Implementation uses an array backed IntBuffer.
AWTGLPixelBuffer can be produced via AWTGLPixelBufferProvider's allocate(..).
See AWTGLPixelBuffer#requiresNewBuffer(GL, int, int, int) for allowRowStride details.
If using allowRowStride == true, user may needs to get the aligned image since requiresNewBuffer(GL, int, int, int) will allow different width in this case.
Definition at line 67 of file AWTGLPixelBuffer.java.
| com.jogamp.opengl.util.awt.AWTGLPixelBuffer.AWTGLPixelBuffer | ( | final PixelFormat.Composition | hostPixelComp, |
| final GLPixelAttributes | pixelAttributes, | ||
| final boolean | pack, | ||
| final int | awtFormat, | ||
| final int | width, | ||
| final int | height, | ||
| final int | depth, | ||
| final BufferedImage | image, | ||
| final Buffer | buffer, | ||
| final boolean | allowRowStride | ||
| ) |
| hostPixelComp | the host PixelFormat.Composition |
| pixelAttributes | the desired GLPixelAttributes |
| pack | true for read mode GPU -> CPU, e.g. glReadPixels. false for write mode CPU -> GPU, e.g. glTexImage2D. |
| awtFormat | the used AWT format, i.e. AWTGLPixelBufferProvider#getAWTFormat(GLProfile, int) |
| width | in pixels |
| height | in pixels |
| depth | in pixels |
| image | the AWT image |
| buffer | the backing array |
| allowRowStride | If true, allow row-stride, otherwise not. See requiresNewBuffer(GL, int, int, int). If true, user shall decide whether to use a width-aligned image. |
Definition at line 97 of file AWTGLPixelBuffer.java.
| void com.jogamp.opengl.util.awt.AWTGLPixelBuffer.dispose | ( | ) |
Dispose resources.
See isValid().
Reimplemented from com.jogamp.opengl.util.GLPixelBuffer.
Definition at line 112 of file AWTGLPixelBuffer.java.
| BufferedImage com.jogamp.opengl.util.awt.AWTGLPixelBuffer.getAlignedImage | ( | final int | width, |
| final int | height | ||
| ) | throws IllegalArgumentException |
Returns a width- and height-aligned image representation sharing data w/ image.
| width | |
| height |
| IllegalArgumentException | if requested size exceeds image size |
Definition at line 124 of file AWTGLPixelBuffer.java.
| final int com.jogamp.opengl.util.awt.AWTGLPixelBuffer.getAWTFormat | ( | ) |
Definition at line 109 of file AWTGLPixelBuffer.java.
| final PixelFormat.Composition com.jogamp.opengl.util.awt.AWTGLPixelBuffer.getHostPixelComp | ( | ) |
Definition at line 108 of file AWTGLPixelBuffer.java.
| final boolean com.jogamp.opengl.util.awt.AWTGLPixelBuffer.isDataBufferSource | ( | final BufferedImage | imageU | ) |
Definition at line 142 of file AWTGLPixelBuffer.java.
| String com.jogamp.opengl.util.awt.AWTGLPixelBuffer.toString | ( | ) |
Reimplemented from com.jogamp.opengl.util.GLPixelBuffer.
Definition at line 155 of file AWTGLPixelBuffer.java.
| StringBuilder com.jogamp.opengl.util.awt.AWTGLPixelBuffer.toString | ( | StringBuilder | sb | ) |
Reimplemented from com.jogamp.opengl.util.GLPixelBuffer.
Definition at line 149 of file AWTGLPixelBuffer.java.
| final BufferedImage com.jogamp.opengl.util.awt.AWTGLPixelBuffer.image |
The underlying BufferedImage.
Definition at line 78 of file AWTGLPixelBuffer.java.