29package com.jogamp.opengl.test.junit.newt;
31import java.lang.reflect.InvocationTargetException;
34import org.junit.FixMethodOrder;
35import org.junit.runners.MethodSorters;
36import org.junit.Assert;
38import com.jogamp.nativewindow.WindowClosingProtocol.WindowClosingMode;
40import com.jogamp.opengl.GLCapabilities;
41import com.jogamp.opengl.GLProfile;
43import com.jogamp.newt.opengl.GLWindow;
45import com.jogamp.opengl.test.junit.jogl.demos.es2.GearsES2;
47import com.jogamp.opengl.test.junit.util.NewtTestUtil;
48import com.jogamp.opengl.test.junit.util.TestUtil;
49import com.jogamp.opengl.test.junit.util.UITestCase;
51@FixMethodOrder(MethodSorters.NAME_ASCENDING)
64 Assert.assertEquals(
true, glWindow.
isVisible());
81 Assert.assertEquals(
true, closingListener.isWindowClosing());
82 closingListener.reset();
93 Assert.assertEquals(
true, closingListener.isWindowClosing());
96 public static void main(
final String[] args) {
98 org.junit.runner.JUnitCore.
main(tstname);
An implementation of GLAutoDrawable and Window interface, using a delegated Window instance,...
WindowClosingMode setDefaultCloseOperation(final WindowClosingMode op)
final boolean isNativeValid()
final void setSize(final int width, final int height)
Sets the size of the window's client area in window units, excluding decorations.
final boolean isVisible()
final void setVisible(final boolean visible)
Calls setVisible(true, visible), i.e.
WindowClosingMode getDefaultCloseOperation()
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.
static void main(final String[] args)
static TestUtil.WindowClosingListener addClosingListener(final Window win)
static boolean closeWindow(final Window win, final boolean willClose, final TestUtil.WindowClosingListener closingListener, final Runnable waitAction)
Programmatically issue windowClosing on AWT or NEWT.
Window closing mode if triggered by toolkit close operation.
DO_NOTHING_ON_CLOSE
Do nothing on native window close operation.
DISPOSE_ON_CLOSE
Dispose resources on native window close operation.
void addGLEventListener(GLEventListener listener)
Adds the given listener to the end of this drawable queue.