29package com.jogamp.opengl.test.junit.jogl.acore;
31import com.jogamp.nativewindow.AbstractGraphicsDevice;
32import com.jogamp.nativewindow.NativeWindowFactory;
33import com.jogamp.opengl.GLCapabilities;
34import com.jogamp.opengl.GLProfile;
36import org.junit.Assert;
37import org.junit.BeforeClass;
39import org.junit.FixMethodOrder;
40import org.junit.runners.MethodSorters;
42import com.jogamp.newt.opengl.GLWindow;
43import com.jogamp.opengl.test.junit.jogl.demos.es1.RedSquareES1;
44import com.jogamp.opengl.test.junit.util.DumpGLInfo;
45import com.jogamp.opengl.test.junit.util.MiscUtils;
46import com.jogamp.opengl.test.junit.util.QuitAdapter;
47import com.jogamp.opengl.test.junit.util.UITestCase;
48import com.jogamp.opengl.util.Animator;
56@FixMethodOrder(MethodSorters.NAME_ASCENDING)
58 static long duration = 500;
59 static int width = 512, height = 512;
60 static String x11DefaultDisplay =
":0.0";
64 System.setProperty(
"nativewindow.x11.display.default", x11DefaultDisplay);
69 Assert.assertNotNull(glWindow);
70 glWindow.
setTitle(getSimpleTestName(
"."));
71 glWindow.
setSize(width, height);
97 while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.
getTotalFPSDuration()<duration) {
109 System.out.println(
"GLProfile.getDefaultDevice(): "+defaultDevice);
111 System.out.println(
"GLProfile.getDefault(): "+glp);
115 Assert.assertNotNull(glWindow);
126 Assert.assertEquals(
"X11 Default device does not match", defaultDevice.
getConnection(), x11DefaultDisplay);
136 public static void main(
final String args[]) {
137 for(
int i=0; i<args.length; i++) {
138 if(args[i].equals(
"-time")) {
141 }
else if(args[i].equals(
"-x11DefaultDisplay")) {
142 x11DefaultDisplay = args[++i];
Provides a pluggable mechanism for arbitrary window toolkits to adapt their components to the NativeW...
static final String TYPE_X11
X11 type, as retrieved with getNativeWindowType(boolean).
static String getNativeWindowType(final boolean useCustom)
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
final int getSurfaceHeight()
Returns the height of this GLDrawable's surface client area in pixel units.
final void setTitle(final String title)
final int getX()
Returns the current x position of this window, relative to it's parent.
final void addKeyListener(final KeyListener l)
Appends the given com.jogamp.newt.event.KeyListener to the end of the list.
final int getY()
Returns the current y position of the top-left corner of the client area relative to it's parent in w...
final int getSurfaceWidth()
Returns the width of this GLDrawable's surface client area in pixel units.
final void setSize(final int width, final int height)
Sets the size of the window's client area in window units, excluding decorations.
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.
final CapabilitiesImmutable getChosenCapabilities()
Gets an immutable set of chosen capabilities.
final InsetsImmutable getInsets()
Returns the insets defined as the width and height of the window decoration on the left,...
final void destroy()
Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
final Window getDelegatedWindow()
If the implementation uses delegation, return the delegated Window instance, otherwise return this in...
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 String glAvailabilityToString(final AbstractGraphicsDevice device)
static GLProfile getDefault(final AbstractGraphicsDevice device)
Returns a default GLProfile object, reflecting the best for the running platform.
static AbstractGraphicsDevice getDefaultDevice()
This is a clone of TestGLPointsNEWT which uses the ability to specify the X11 default display program...
void test00_DefaultDevice()
static void main(final String args[])
void test01_GLDefaultRendering()
void runTestGL(final GLCapabilities caps)
static long atol(final String str, final long def)
void setPostSNDetail(final String v)
final long getTotalFPSDuration()
final void setUpdateFPSFrames(final int frames, final PrintStream out)
final synchronized boolean start()
Starts this animator, if not running.
final synchronized boolean stop()
Stops this animator.
A interface describing a graphics device in a toolkit-independent manner.
String getConnection()
Returns the semantic GraphicsDevice connection.
CapabilitiesImmutable getChosenCapabilities()
Gets an immutable set of chosen capabilities.
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.