29package com.jogamp.opengl.test.junit.jogl.util;
31import com.jogamp.newt.opengl.GLWindow;
32import com.jogamp.opengl.test.junit.util.UITestCase;
33import com.jogamp.opengl.test.junit.util.QuitAdapter;
35import com.jogamp.opengl.util.Animator;
37import com.jogamp.opengl.test.junit.jogl.demos.es1.GearsES1;
38import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquareES1;
40import com.jogamp.opengl.GLCapabilities;
41import com.jogamp.opengl.GLEventListener;
42import com.jogamp.opengl.GLProfile;
44import org.junit.Assert;
45import org.junit.BeforeClass;
46import org.junit.AfterClass;
48import org.junit.FixMethodOrder;
49import org.junit.runners.MethodSorters;
51@FixMethodOrder(MethodSorters.NAME_ASCENDING)
53 static int width, height;
67 Assert.assertNotNull(glWindow);
68 glWindow.
setTitle(getSimpleTestName(
"."));
80 glWindow.
setSize(width, height);
86 while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.
getTotalFPSDuration()<duration) {
98 runTestGL0(caps, demo01);
102 runTestGL0(caps, demo02);
104 final DemoGL2ES1ImmModeSink demo03 =
new DemoGL2ES1ImmModeSink(
true);
105 demo03.setForceFFPEmu(forceFFPEmu,
false,
false,
false);
106 runTestGL0(caps, demo03);
110 runTestGL0(caps, demo04);
117 runTestGL(caps,
false);
124 runTestGL(caps,
true);
131 runTestGL(caps,
false);
138 runTestGL(caps,
false);
141 static long duration = 1000;
143 public static void main(
final String args[]) {
144 for(
int i=0; i<args.length; i++) {
145 if(args[i].equals(
"-time")) {
148 duration = Integer.parseInt(args[i]);
149 }
catch (
final Exception ex) { ex.printStackTrace(); }
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
final void setTitle(final String title)
final void addKeyListener(final KeyListener l)
Appends the given com.jogamp.newt.event.KeyListener to the end of the list.
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 addWindowListener(final WindowListener l)
Appends the given com.jogamp.newt.event.WindowListener to the end of the list.
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 boolean isAvailable(final AbstractGraphicsDevice device, final String profile)
Returns the availability of a profile on a device.
static final String GLES2
The embedded OpenGL profile ES 2.x, with x >= 0.
static GLProfile get(final AbstractGraphicsDevice device, String profile)
Returns a GLProfile object.
static final String GL2
The desktop OpenGL profile 1.x up to 3.0.
static final String GL2ES1
The intersection of the desktop GL2 and embedded ES1 profile.
void setForceFFPEmu(final boolean forceFFPEmu, final boolean verboseFFPEmu, final boolean debugFFPEmu, final boolean traceFFPEmu)
void setForceFFPEmu(final boolean forceFFPEmu, final boolean verboseFFPEmu, final boolean debugFFPEmu, final boolean traceFFPEmu)
void setForceFFPEmu(final boolean forceFFPEmu, final boolean verboseFFPEmu, final boolean debugFFPEmu, final boolean traceFFPEmu)
void runTestGL(final GLCapabilities caps, final boolean forceFFPEmu)
static void main(final String args[])
void runTestGL0(final GLCapabilities caps, final GLEventListener demo)
static void releaseClass()
void test03GL2ES1Normal()
void setPostSNDetail(final String v)
final long getTotalFPSDuration()
final void setUpdateFPSFrames(final int frames, final PrintStream out)
final synchronized boolean start()
Starts this animator, if not running.
final synchronized boolean stop()
Stops this animator.
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
GLEventListener removeGLEventListener(GLEventListener listener)
Removes the given listener from this drawable queue.
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.