public class AWTGLPixelBuffer extends GLPixelBuffer
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 AWTGLPixelBuffer.AWTGLPixelBufferProvider
's
allocate(..)
.
See GLPixelBuffer.requiresNewBuffer(GL, int, int, int)
for GLPixelBuffer.allowRowStride
details.
Modifier and Type | Class and Description |
---|---|
static class |
AWTGLPixelBuffer.AWTGLPixelBufferProvider
Provider for
AWTGLPixelBuffer instances. |
static class |
AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider
Provider for singleton
AWTGLPixelBuffer instances. |
GLPixelBuffer.DefaultGLPixelBufferProvider, GLPixelBuffer.GLPixelAttributes, GLPixelBuffer.GLPixelBufferProvider, GLPixelBuffer.SingletonGLPixelBufferProvider
Modifier and Type | Field and Description |
---|---|
static GLPixelBuffer.GLPixelAttributes |
awtPixelAttributesIntRGB3 |
static GLPixelBuffer.GLPixelAttributes |
awtPixelAttributesIntRGBA4 |
BufferedImage |
image
The underlying
BufferedImage . |
allowRowStride, buffer, bufferElemSize, byteSize, defaultProviderNoRowStride, defaultProviderWithRowStride, depth, height, pack, pixelAttributes, width
Constructor and Description |
---|
AWTGLPixelBuffer(GLPixelBuffer.GLPixelAttributes pixelAttributes,
int width,
int height,
int depth,
boolean pack,
BufferedImage image,
Buffer buffer,
boolean allowRowStride) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose resources.
|
String |
toString() |
StringBuilder |
toString(StringBuilder sb) |
capacity, clear, flip, getAllowRowStride, isValid, limit, position, position, requiresNewBuffer, rewind
public static final GLPixelBuffer.GLPixelAttributes awtPixelAttributesIntRGBA4
public static final GLPixelBuffer.GLPixelAttributes awtPixelAttributesIntRGB3
public final BufferedImage image
BufferedImage
.public AWTGLPixelBuffer(GLPixelBuffer.GLPixelAttributes pixelAttributes, int width, int height, int depth, boolean pack, BufferedImage image, Buffer buffer, boolean allowRowStride)
pixelAttributes
- the desired GLPixelBuffer.GLPixelAttributes
width
- in pixelsheight
- in pixelsdepth
- in pixelspack
- true for read mode GPU -> CPU, otherwise false for write mode CPU -> GPUimage
- the AWT imagebuffer
- the backing arrayallowRowStride
- If true
, allow row-stride, otherwise not. See GLPixelBuffer.requiresNewBuffer(GL, int, int, int)
.public void dispose()
GLPixelBuffer
GLPixelBuffer.isValid()
.dispose
in class GLPixelBuffer
public StringBuilder toString(StringBuilder sb)
toString
in class GLPixelBuffer
public String toString()
toString
in class GLPixelBuffer
Copyright 2010 JogAmp Community.