29package com.jogamp.opengl.test.junit.newt;
31import org.junit.BeforeClass;
33import org.junit.FixMethodOrder;
34import org.junit.runners.MethodSorters;
36import java.io.IOException;
37import java.lang.reflect.InvocationTargetException;
39import com.jogamp.opengl.GLCapabilities;
40import com.jogamp.opengl.GLProfile;
41import javax.swing.JFrame;
42import javax.swing.SwingUtilities;
43import javax.swing.WindowConstants;
45import com.jogamp.newt.awt.NewtCanvasAWT;
46import com.jogamp.newt.opengl.GLWindow;
47import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
48import com.jogamp.opengl.test.junit.util.*;
53@FixMethodOrder(MethodSorters.NAME_ASCENDING)
62 final JFrame jf =
new JFrame();
64 jf.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
69 jf.getContentPane().add(canvas);
74 final JFrame f_jf = jf;
76 SwingUtilities.invokeAndWait(
new Runnable() {
78 f_jf.setSize(800, 600);
79 f_jf.setVisible(
true);
85 SwingUtilities.invokeAndWait(
new Runnable() {
93 public static void main(
final String args[])
throws IOException {
107 org.junit.runner.JUnitCore.
main(tstname);
AWT Canvas containing a NEWT Window using native parenting.
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
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 getGL2ES2(final AbstractGraphicsDevice device)
Returns the GL2ES2 profile implementation, hence compatible w/ GL2ES2.
This simple program will throw a RuntimeException when the application is closed.
void testEventSourceNotNewtBug()
static void main(final String args[])
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.