29package com.jogamp.opengl.test.junit.jogl.offscreen;
32import com.jogamp.newt.Display;
33import com.jogamp.newt.NewtFactory;
34import com.jogamp.newt.Screen;
35import com.jogamp.newt.Window;
36import com.jogamp.newt.opengl.GLWindow;
37import org.junit.Assert;
39import org.junit.FixMethodOrder;
40import org.junit.runners.MethodSorters;
42import com.jogamp.opengl.*;
44import com.jogamp.opengl.test.junit.util.UITestCase;
45import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquareES1;
46import java.io.IOException;
52@FixMethodOrder(MethodSorters.NAME_ASCENDING)
54 static final int width = 640, height = 480;
61 Assert.assertNotNull(glp);
63 Assert.assertNotNull(caps);
68 Assert.assertNotNull(display);
70 Assert.assertNotNull(screen);
72 Assert.assertNotNull(window);
75 Assert.assertNotNull(glWindow);
105 Assert.assertNotNull(glp);
107 Assert.assertNotNull(caps);
112 Assert.assertNotNull(display);
114 Assert.assertNotNull(screen);
116 Assert.assertNotNull(window);
119 Assert.assertNotNull(glWindow);
138 public static void main(
final String args[])
throws IOException {
140 org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.
main(
new String[] {
144 "haltOnFailure=false",
146 "outputtoformatters=true",
147 "logfailedtests=true",
148 "logtestlistenerevents=true",
149 "formatter=org.apache.tools.ant.taskdefs.optional.junit.PlainJUnitResultFormatter",
150 "formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,TEST-"+tstname+
".xml" } );
abstract void destroy()
Manually trigger the destruction, incl.
static Display createDisplay(final String name)
Create a Display entity.
static Window createWindow(final CapabilitiesImmutable caps)
Create a top level Window entity on the default Display and default Screen.
static Screen createScreen(final Display display, final int index)
Create a Screen entity.
A screen may span multiple MonitorDevices representing their combined virtual size.
abstract void destroy()
Manually trigger the destruction, incl.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
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 get(final AbstractGraphicsDevice device, String profile)
Returns a GLProfile object.
static final String GL2ES1
The intersection of the desktop GL2 and embedded ES1 profile.
Using ES1 GL demo, since pixmap might not be hw accelerated, hence it is possible to not have GLSL.
void test11OffscreenWindowPixmap()
static void main(final String args[])
void test14OffscreenSnapshotWithDemoPixmap()
static void setDemoFields(final GLEventListener demo, final Window window, final GLWindow glWindow, final boolean debug)
static void run(final String testName, final GLWindow windowOffScreen, final GLEventListener demo, final GLWindow windowOnScreenBlit, final WindowListener wl, final MouseListener ml, final SurfaceUpdatedListener ul, final int frames, final boolean snapshot, final boolean debug)
static GLCapabilities fixCaps(final GLCapabilities caps, final boolean onscreen, final boolean pbuffer, final boolean undecorated)
Specifying NEWT's Window functionality:
void setSize(int width, int height)
Sets the size of the window's client area in window units, excluding decorations.
void destroy()
Destroys this window incl.releasing all related resources.
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.