28package com.jogamp.opengl.test.junit.jogl.demos.gl4.newt;
30import java.io.IOException;
32import com.jogamp.opengl.GLCapabilities;
33import com.jogamp.opengl.GLEventListener;
34import com.jogamp.opengl.GLProfile;
36import org.junit.Assert;
37import org.junit.FixMethodOrder;
39import org.junit.runners.MethodSorters;
41import com.jogamp.newt.opengl.GLWindow;
42import com.jogamp.opengl.test.junit.jogl.demos.gl4.TriangleInstancedRendererWithShaderState;
43import com.jogamp.opengl.test.junit.jogl.demos.gl4.TrianglesInstancedRendererHardcoded;
44import com.jogamp.opengl.test.junit.util.MiscUtils;
45import com.jogamp.opengl.test.junit.util.QuitAdapter;
46import com.jogamp.opengl.test.junit.util.UITestCase;
47import com.jogamp.opengl.util.Animator;
51@FixMethodOrder(MethodSorters.NAME_ASCENDING)
53 static long duration = 500;
56 System.err.println(
"Profile "+profile+
" n/a");
65 if(
null == caps ) {
return; }
78 Assert.assertNotNull(glWindow);
81 glWindow.
setTitle(
"JOGL Instanced Rendering Test");
87 final SnapshotGLEventListener snapshotGLEventListener =
new SnapshotGLEventListener();
92 snapshotGLEventListener.setMakeSnapshot();
93 while(!quitAdapter.shouldQuit() && animator.isAnimating() && animator.
getTotalFPSDuration()<duration) {
99 public static void main(
final String args[])
throws IOException {
100 for(
int i=0; i<args.length; i++) {
101 if(args[i].equals(
"-time")) {
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
final boolean isNativeValid()
final void setTitle(final String title)
final void addKeyListener(final KeyListener l)
Appends the given com.jogamp.newt.event.KeyListener to the end of the list.
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 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 boolean isAvailable(final AbstractGraphicsDevice device, final String profile)
Returns the availability of a profile on a device.
static GLProfile get(final AbstractGraphicsDevice device, String profile)
Returns a GLProfile object.
static final String GL4
The desktop OpenGL core profile 4.x, with x >= 0.
Test Instanced rendering demo TrianglesInstancedRenderer.
static void main(final String args[])
static long atol(final String str, final long def)
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.
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.