29package com.jogamp.opengl.test.junit.jogl.acore.glels;
31import java.io.IOException;
32import java.lang.reflect.InvocationTargetException;
34import com.jogamp.newt.opengl.GLWindow;
36import com.jogamp.opengl.GLAutoDrawable;
37import com.jogamp.opengl.GLCapabilitiesImmutable;
38import com.jogamp.opengl.GLDrawableFactory;
40import com.jogamp.opengl.test.junit.util.QuitAdapter;
42import org.junit.Assert;
43import org.junit.FixMethodOrder;
44import org.junit.runners.MethodSorters;
50@FixMethodOrder(MethodSorters.NAME_ASCENDING)
55 if( caps.isOnscreen() ) {
57 Assert.assertNotNull(glWindow);
60 if(
null != quitAdapter ) {
68 Assert.assertNotNull(glad);
78 public static void main(
final String args[])
throws IOException {
79 for(
int i=0; i<args.length; i++) {
80 if(args[i].equals(
"-time")) {
83 duration = Integer.parseInt(args[i]);
84 }
catch (
final Exception ex) { ex.printStackTrace(); }
85 }
else if(args[i].equals(
"-period")) {
88 period = Integer.parseInt(args[i]);
89 }
catch (
final Exception ex) { ex.printStackTrace(); }
90 }
else if(args[i].equals(
"-testUnsafe")) {
91 testEvenUnsafeSwapGLContext =
true;
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 addWindowListener(final WindowListener l)
Appends the given com.jogamp.newt.event.WindowListener to the end of the list.
static GLWindow create(final GLCapabilitiesImmutable caps)
Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display wi...
abstract GLOffscreenAutoDrawable createOffscreenAutoDrawable(AbstractGraphicsDevice device, GLCapabilitiesImmutable caps, GLCapabilitiesChooser chooser, int width, int height)
Creates a realized GLOffscreenAutoDrawable incl it's offscreen NativeSurface with the given capabilit...
static GLDrawableFactory getFactory(final GLProfile glProfile)
Returns the sole GLDrawableFactory instance.
Test re-association (switching) of GLWindow /GLDrawables, from GLWindow/GLOffscreenAutoDrawable to an...
Test re-association (switching) of GLWindow /GLDrawables, from GLWindow/GLOffscreenAutoDrawable to an...
static void main(final String args[])
GLAutoDrawable createGLAutoDrawable(final QuitAdapter quitAdapter, final GLCapabilitiesImmutable caps, final int width, final int height)
void destroyGLAutoDrawable(final GLAutoDrawable glad)
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
Specifies an immutable set of OpenGL capabilities.