Top Description Fields Constructors Methods
com.jogamp.opengl.util.awt

public Class AWTGLReadBufferUtil

extends GLReadBufferUtil
Class Inheritance
Imports
java.awt.image.BufferedImage, com.jogamp.opengl.GL, .GLDrawable, .GLProfile, com.jogamp.opengl.util.GLReadBufferUtil

GLReadBufferUtil specialization allowing to read out a frambuffer to an AWT BufferedImage utilizing AWTPixelBufferProviderInt for further AWT processing.

Field Summary

Inherited from com.jogamp.opengl.util.GLReadBufferUtil:
hasAlphapixelBufferProviderpsmreadPixelBufferreadTexturereadTextureData

Constructor Summary

AccessConstructor and Description
public
AWTGLReadBufferUtil(final GLProfile glp, final boolean alpha)

Method Summary

Modifier and TypeMethod and Description
public AWTGLPixelBuffer
public BufferedImage
readPixelsToBufferedImage(final GL
the current GL context object. It's read drawable is being used as the pixel source.
gl
,
final boolean
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).
awtOrientation
)

Read the drawable's pixels to TextureData and Texture, if requested at construction, and returns an aligned BufferedImage.

public BufferedImage
readPixelsToBufferedImage(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
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).
awtOrientation
)

Read the drawable's pixels to TextureData and Texture, if requested at construction, and returns an aligned BufferedImage.

Inherited from com.jogamp.opengl.util.GLReadBufferUtil:
disposegetGLPixelStorageModesgetPixelBuffergetPixelBufferProvidergetTexturegetTextureDatahasAlphaisValidreadPixelsreadPixelsreadPixelsImplrewindPixelBufferwrite

Constructor Detail

AWTGLReadBufferUtilback to summary
public AWTGLReadBufferUtil(final GLProfile glp, final boolean alpha)

Method Detail

getAWTGLPixelBufferback to summary
public AWTGLPixelBuffer getAWTGLPixelBuffer()

Returns the AWTGLPixelBuffer, as filled by previous call to readPixels(GL, int, int, int, int, boolean).

readPixelsToBufferedImageback to summary
public 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.

Parameters
gl:GL

the current GL context object. It's read drawable is being used as the pixel source.

awtOrientation:boolean

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).

See Also
AWTGLReadBufferUtil(GLProfile, boolean)
readPixelsToBufferedImageback to summary
public 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.

Parameters
gl:GL

the current GL context object. It's read drawable is being used as the pixel source.

inX:int

readPixel x offset

inY:int

readPixel y offset

inWidth:int

optional readPixel width value, used if [1 .. drawable.width], otherwise using drawable.width

inHeight:int

optional readPixel height, used if [1 .. drawable.height], otherwise using drawable.height

awtOrientation:boolean

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).

See Also
AWTGLReadBufferUtil(GLProfile, boolean)