28package com.jogamp.opengl.util.awt;
30import java.awt.image.BufferedImage;
32import com.jogamp.opengl.GL;
33import com.jogamp.opengl.GLDrawable;
34import com.jogamp.opengl.GLProfile;
35import com.jogamp.opengl.util.GLPixelBuffer;
36import com.jogamp.opengl.util.GLReadBufferUtil;
37import com.jogamp.opengl.util.GLPixelBuffer.GLPixelBufferProvider;
96 public BufferedImage
readPixelsToBufferedImage(
final GL gl,
final int inX,
final int inY,
final int inWidth,
final int inHeight,
final boolean awtOrientation) {
98 final int width, height;
109 if(
readPixelsImpl(drawable, gl, inX, inY, width, height, awtOrientation) ) {
abstract GLDrawable getGLReadDrawable()
Returns the read-Drawable this context uses for read framebuffer operations.
Specifies the the OpenGL profile.
final boolean isGL2ES3()
Indicates whether this profile is capable of GL2ES3.
Utility to read out the current FB to TextureData, optionally writing the data back to a texture obje...
TextureData getTextureData()
boolean readPixelsImpl(final GLDrawable drawable, final GL gl, final int inX, final int inY, final int width, final int height, final boolean mustFlipVertically)
GLPixelBuffer getPixelBuffer()
Returns the GLPixelBuffer, created and filled by readPixels(GLAutoDrawable, boolean).
Provider for AWTGLPixelBuffer instances.
AWT GLPixelBuffer backed by an BufferedImage of type BufferedImage#TYPE_INT_ARGB or BufferedImage#TYP...
BufferedImage getAlignedImage(final int width, final int height)
Returns a width- and height-aligned image representation sharing data w/ image.
GLReadBufferUtil specialization allowing to read out a frambuffer to an AWT BufferedImage utilizing A...
AWTGLReadBufferUtil(final GLProfile glp, final boolean requestAlpha)
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,...
AWTGLPixelBuffer getAWTGLPixelBuffer()
Returns the AWTGLPixelBuffer, as filled by previous call to readPixels(GL, int, int,...
BufferedImage readPixelsToBufferedImage(final GL gl, final boolean awtOrientation)
Read the drawable's pixels to TextureData and Texture, if requested at construction,...
Utilities for dealing with images.
static void flipImageVertically(final BufferedImage image)
Flips the supplied BufferedImage vertically.
GLContext getContext()
Returns the GLContext associated which this GL object.
An abstraction for an OpenGL rendering target.
int getSurfaceWidth()
Returns the width of this GLDrawable's surface client area in pixel units.
int getSurfaceHeight()
Returns the height of this GLDrawable's surface client area in pixel units.