29package com.jogamp.opengl.test.junit.jogl.acore.glels;
31import java.io.IOException;
33import com.jogamp.opengl.GLCapabilities;
34import com.jogamp.opengl.GLProfile;
37import com.jogamp.newt.Display;
38import com.jogamp.newt.NewtFactory;
39import com.jogamp.newt.Screen;
40import com.jogamp.opengl.GLEventListenerState;
41import com.jogamp.opengl.util.Animator;
42import com.jogamp.opengl.GLRendererQuirks;
43import com.jogamp.opengl.test.junit.util.GLEventListenerCounter;
44import com.jogamp.opengl.test.junit.util.MiscUtils;
47import org.junit.FixMethodOrder;
48import org.junit.runners.MethodSorters;
56@FixMethodOrder(MethodSorters.NAME_ASCENDING)
59 static int loops = 10;
60 static long duration2 = 100;
69 public static boolean fixedNewtDisplay =
true;
72 public
void test11GLWindow2GLCanvasOnScrnGL2ES2() throws InterruptedException {
75 System.err.println(
"GL2ES2 n/a, test n/a.");
78 if( jogamp.nativewindow.jawt.JAWTUtil.isOffscreenLayerRequired() ) {
79 System.err.println(
"JAWT required offscreen, test n/a.");
93 if( fixedNewtDisplay ) {
102 duration = duration2;
104 for(
int i=0; i<loops; i++) {
111 System.err.println(
"Test "+i+
"/"+loops+
".1: GLAD-1 "+gladType1+
", preserving.");
112 testGLADOneLifecycle(screen, caps, gladType1, width, height,
113 glelTracker, snapshotGLEventListener,
116 System.err.println(
"Test "+i+
"/"+loops+
".1: done");
121 System.err.println(
"Test "+i+
"/"+loops+
".2: GLAD-1 "+gladType2+
", restoring.");
122 testGLADOneLifecycle(screen, caps, gladType2, width+100, height+100,
123 glelTracker, snapshotGLEventListener,
126 System.err.println(
"Test "+i+
"/"+loops+
".2: done.");
131 if( fixedNewtDisplay ) {
136 public static void main(
final String args[])
throws IOException {
137 for(
int i=0; i<args.length; i++) {
138 if(args[i].equals(
"-time")) {
141 }
else if(args[i].equals(
"-loops")) {
144 }
else if(args[i].equals(
"-noFixedNewtDisplay")) {
145 fixedNewtDisplay =
false;
static Display createDisplay(final String name)
Create a Display entity.
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 int addReference()
See Display#addReference().
abstract int removeReference()
See Display#removeReference().
Specifies a set of OpenGL capabilities.
GLEventListenerState is holding GLAutoDrawable components crucial to relocating all its GLEventListen...
Specifies the the OpenGL profile.
static final String GL2ES2
The intersection of the desktop GL3, GL2 and embedded ES2 profile.
Test re-association of GLContext/GLDrawables, here GLContext's survival of GLDrawable destruction and...
static void main(final String args[])
static int atoi(final String str, final int def)
static long atol(final String str, final long def)
final synchronized boolean start()
Starts this animator, if not running.
final synchronized boolean stop()
Stops this animator.