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.GLRendererQuirks;
42import com.jogamp.opengl.util.Animator;
44import com.jogamp.opengl.test.junit.util.GLEventListenerCounter;
47import org.junit.FixMethodOrder;
48import org.junit.runners.MethodSorters;
75@FixMethodOrder(MethodSorters.NAME_ASCENDING)
79 public
void test01GLCanvasOnScrn2GLWindowGL2ES2() throws InterruptedException {
81 if(
null == reqGLCaps)
return;
86 public
void test02GLCanvasOnScrn2GLWindowGLES2() throws InterruptedException {
88 if(
null == reqGLCaps)
return;
93 public
void test11GLWindow2GLCanvasOnScrnGL2ES2() throws InterruptedException {
95 if(
null == reqGLCaps)
return;
104 public
void test12GLWindow2GLCanvasOnScrnGLES2() throws InterruptedException {
106 if(
null == reqGLCaps)
return;
115 public
void test21GLCanvasOffScrn2GLWindowGL2ES2() throws InterruptedException {
117 if(
null == reqGLCaps)
return;
122 public
void test22GLCanvasOffScrn2GLWindowGLES2() throws InterruptedException {
124 if(
null == reqGLCaps)
return;
129 public
void test31GLWindow2GLCanvasOffScrnGL2ES2() throws InterruptedException {
131 if(
null == reqGLCaps)
return;
140 public
void test32GLWindow2GLCanvasOffScrnGLES2() throws InterruptedException {
142 if(
null == reqGLCaps)
return;
150 private void testGLCanvas2GLWindowImpl(
final Screen screen,
final GLCapabilities caps,
final GLADType gladType1,
final GLADType gladType2)
throws InterruptedException {
151 if( !validateOnOffscreenLayer(gladType1, gladType2) ) {
154 final SnapshotGLEventListener snapshotGLEventListener =
new SnapshotGLEventListener();
164 testGLADOneLifecycle(screen, caps, gladType1, width,
166 snapshotGLEventListener,
167 null, glels, animator);
172 testGLADOneLifecycle(screen, caps, gladType2, width+100,
173 height+100, glelTracker,
174 snapshotGLEventListener,
175 glels[0],
null,
null);
180 public static void main(
final String args[])
throws IOException {
181 for(
int i=0; i<args.length; i++) {
182 if(args[i].equals(
"-time")) {
185 duration = Integer.parseInt(args[i]);
186 }
catch (
final Exception ex) { ex.printStackTrace(); }
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.
static final String GLES2
The embedded OpenGL profile ES 2.x, with x >= 0.
Test re-association of GLContext/GLDrawables, here GLContext's survival of GLDrawable destruction and...
Test re-association of GLContext/GLDrawables, here GLContext's survival of GLDrawable destruction and...
static void main(final String args[])
final synchronized boolean start()
Starts this animator, if not running.
final synchronized boolean stop()
Stops this animator.