|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jogamp.opengl.util.GLPixelBuffer
com.jogamp.opengl.util.awt.AWTGLPixelBuffer
public class AWTGLPixelBuffer
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 AWTGLPixelBuffer.AWTGLPixelBufferProvider's
allocate(..).
See GLPixelBuffer.requiresNewBuffer(GL, int, int, int) for GLPixelBuffer.allowRowStride details.
If using allowRowStride == true, user may needs to get the aligned image
since GLPixelBuffer.requiresNewBuffer(GL, int, int, int) will allow different width in this case.
| Nested Class Summary | |
|---|---|
static class |
AWTGLPixelBuffer.AWTGLPixelBufferProvider
Provider for AWTGLPixelBuffer instances. |
static class |
AWTGLPixelBuffer.SingleAWTGLPixelBufferProvider
Provider for singleton AWTGLPixelBuffer instances. |
| Nested classes/interfaces inherited from class com.jogamp.opengl.util.GLPixelBuffer |
|---|
GLPixelBuffer.DefaultGLPixelBufferProvider, GLPixelBuffer.GLPixelAttributes, GLPixelBuffer.GLPixelBufferProvider, GLPixelBuffer.SingletonGLPixelBufferProvider |
| Field Summary | |
|---|---|
static GLPixelBuffer.GLPixelAttributes |
awtPixelAttributesIntRGB3
|
static GLPixelBuffer.GLPixelAttributes |
awtPixelAttributesIntRGBA4
|
BufferedImage |
image
The underlying BufferedImage. |
| Fields inherited from class com.jogamp.opengl.util.GLPixelBuffer |
|---|
allowRowStride, buffer, bufferElemSize, byteSize, defaultProviderNoRowStride, defaultProviderWithRowStride, depth, height, pack, pixelAttributes, width |
| Constructor Summary | |
|---|---|
AWTGLPixelBuffer(GLPixelBuffer.GLPixelAttributes pixelAttributes,
int width,
int height,
int depth,
boolean pack,
BufferedImage image,
Buffer buffer,
boolean allowRowStride)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Dispose resources. |
BufferedImage |
getAlignedImage(int width,
int height)
Returns a width- and height-aligned image representation sharing data w/ image. |
boolean |
isDataBufferSource(BufferedImage imageU)
|
String |
toString()
|
StringBuilder |
toString(StringBuilder sb)
|
| Methods inherited from class com.jogamp.opengl.util.GLPixelBuffer |
|---|
capacity, clear, flip, getAllowRowStride, isValid, limit, position, position, requiresNewBuffer, rewind |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final GLPixelBuffer.GLPixelAttributes awtPixelAttributesIntRGBA4
public static final GLPixelBuffer.GLPixelAttributes awtPixelAttributesIntRGB3
public final BufferedImage image
BufferedImage.
| Constructor Detail |
|---|
public AWTGLPixelBuffer(GLPixelBuffer.GLPixelAttributes pixelAttributes,
int width,
int height,
int depth,
boolean pack,
BufferedImage image,
Buffer buffer,
boolean allowRowStride)
pixelAttributes - the desired GLPixelAttributeswidth - 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).
If true, user shall decide whether to use a width-aligned image.| Method Detail |
|---|
public void dispose()
GLPixelBufferGLPixelBuffer.isValid().
dispose in class GLPixelBuffer
public BufferedImage getAlignedImage(int width,
int height)
throws IllegalArgumentException
image.
width - height -
IllegalArgumentException - if requested size exceeds image sizepublic final boolean isDataBufferSource(BufferedImage imageU)
public StringBuilder toString(StringBuilder sb)
toString in class GLPixelBufferpublic String toString()
toString in class GLPixelBuffer
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||