29package com.jogamp.opengl.test.junit.jogl.awt;
31import com.jogamp.opengl.GLProfile;
32import com.jogamp.opengl.GLCapabilities;
33import com.jogamp.opengl.awt.GLCanvas;
34import com.jogamp.opengl.util.Animator;
36import com.jogamp.opengl.test.junit.util.UITestCase;
37import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
41import org.junit.Assert;
42import org.junit.Assume;
43import org.junit.BeforeClass;
45import org.junit.FixMethodOrder;
46import org.junit.runners.MethodSorters;
49@FixMethodOrder(MethodSorters.NAME_ASCENDING)
57 final Frame frame =
new Frame(
"Texture Test");
58 Assert.assertNotNull(frame);
61 Assert.assertNotNull(glCanvas);
67 javax.swing.SwingUtilities.invokeAndWait(
new Runnable() {
72 frame.setSize(512, 512);
75 frame.setVisible(
true);
77 }
catch (
final Throwable t) {
79 Assume.assumeNoException(t);
92 javax.swing.SwingUtilities.invokeAndWait(
new Runnable() {
94 frame.setVisible(
false);
95 frame.remove(glCanvas);
98 }
catch (
final Throwable t) {
100 Assume.assumeNoException(t);
107 System.out.println(
"GLProfile Default: "+glp);
112 System.out.println(
"not a GL2ES2 profile");
120 System.out.println(
"GLProfile GL2: " + glprofile );
124 System.out.println(
"GL2 n/a");
132 System.out.println(
"GLProfile GLES2: " + glprofile );
136 System.out.println(
"GLES2 n/a");
140 public static void main(
final String args[]) {
141 org.junit.runner.JUnitCore.main(
TestAWT01GLn.class.getName());
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.
final boolean isGL2ES2()
Indicates whether this profile is capable of GL2ES2.
static String glAvailabilityToString(final AbstractGraphicsDevice device)
static GLProfile getDefault(final AbstractGraphicsDevice device)
Returns a default GLProfile object, reflecting the best for the running platform.
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.
A heavyweight AWT component which provides OpenGL rendering support.
void addGLEventListener(final GLEventListener listener)
Adds the given listener to the end of this drawable queue.
void runTestGL(final GLCapabilities caps)
static void main(final String args[])
final synchronized boolean start()
Starts this animator, if not running.
final synchronized boolean stop()
Stops this animator.