29package com.jogamp.opengl.test.junit.jogl.util.texture;
31import com.jogamp.newt.opengl.GLWindow;
33import com.jogamp.opengl.GLAutoDrawable;
34import com.jogamp.opengl.GLCapabilities;
35import com.jogamp.opengl.GLEventListener;
36import com.jogamp.opengl.GLProfile;
37import com.jogamp.opengl.util.GLReadBufferUtil;
38import com.jogamp.opengl.util.texture.TextureIO;
40import com.jogamp.opengl.test.junit.util.UITestCase;
41import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
42import com.jogamp.opengl.test.junit.jogl.offscreen.WindowUtilNEWT;
44import org.junit.Assert;
45import org.junit.BeforeClass;
47import org.junit.FixMethodOrder;
48import org.junit.runners.MethodSorters;
50@FixMethodOrder(MethodSorters.NAME_ASCENDING)
54 static int width, height;
59 Assert.assertNotNull(glp);
61 Assert.assertNotNull(caps);
72 Assert.assertNotNull(glWindow);
73 glWindow.
setTitle(
"Shared Gears NEWT Test");
74 glWindow.
setSize(width, height);
88 public void reshape(
final GLAutoDrawable drawable,
final int x,
final int y,
final int width,
final int height) { }
101 Assert.assertNotNull(glWindow);
102 glWindow.
setSize(width, height);
113 public void reshape(
final GLAutoDrawable drawable,
final int x,
final int y,
final int width,
final int height) { }
120 public static void main(
final String args[]) {
void setAlphaBits(final int alphaBits)
Sets the number of bits requested for the color buffer's alpha component.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
final void setTitle(final String title)
final void setSize(final int width, final int height)
Sets the size of the window's client area in window units, excluding decorations.
final void setVisible(final boolean visible)
Calls setVisible(true, visible), i.e.
final void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
static GLWindow create(final GLCapabilitiesImmutable caps)
Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display wi...
Specifies a set of OpenGL capabilities.
Specifies the the OpenGL profile.
static GLProfile getDefault(final AbstractGraphicsDevice device)
Returns a default GLProfile object, reflecting the best for the running platform.
static GLCapabilities fixCaps(final GLCapabilities caps, final boolean onscreen, final boolean pbuffer, final boolean undecorated)
void testOnscreenWritePNG_TGA_PAM()
static void main(final String args[])
void testOffscreenWritePNG()
Utility to read out the current FB to TextureData, optionally writing the data back to a texture obje...
static final String TGA
Constant which can be used as a file suffix to indicate a Targa file, value {@value}.
static final String PAM
Constant which can be used as a file suffix to indicate a PAM file, NetPbm magic 7 - binary RGB and R...
static final String PNG
Constant which can be used as a file suffix to indicate a PNG file, value {@value}.
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
GL getGL()
Returns the GL pipeline object this GLAutoDrawable uses.
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.