28package com.jogamp.opengl.test.junit.util;
30import com.jogamp.newt.Display;
31import com.jogamp.newt.NewtFactory;
32import com.jogamp.newt.Screen;
33import com.jogamp.newt.Window;
35import com.jogamp.opengl.GLCapabilities;
36import com.jogamp.opengl.GLContext;
37import com.jogamp.opengl.GLDrawable;
38import com.jogamp.opengl.GLDrawableFactory;
39import com.jogamp.opengl.util.caps.NonFSAAGLCapsChooser;
41import org.junit.Assert;
62 Assert.assertNotNull(display);
65 Assert.assertNotNull(screen);
68 Assert.assertNotNull(window);
70 if( !caps.getSampleBuffers() ) {
82 Assert.assertNotNull(drawable);
88 Assert.assertNotNull(context);
101 Assert.assertNotNull(winctx.
context);
104 Assert.assertNotNull(drawable);
107 Assert.assertNotNull(winctx.
window);
static Display createDisplay(final String name)
Create a Display entity.
static Window createWindow(final CapabilitiesImmutable caps)
Create a top level Window entity on the default Display and default Screen.
static Screen createScreen(final Display display, final int index)
Create a Screen entity.
A screen may span multiple MonitorDevices representing their combined virtual size.
Specifies a set of OpenGL capabilities.
Abstraction for an OpenGL rendering context.
abstract GLDrawable getGLDrawable()
Returns the write-drawable this context uses for framebuffer operations.
abstract int makeCurrent()
Makes this GLContext current on the calling thread.
static final int CONTEXT_CURRENT
Indicates that the context was made current during the last call to makeCurrent, value {@value}.
abstract void enableGLDebugMessage(boolean enable)
Enables or disables the GLDebugOutput feature of extension GLExtensions#ARB_debug_output or GLExtensi...
abstract void destroy()
Destroys this OpenGL context and frees its associated resources.
static final int CONTEXT_CURRENT_NEW
Indicates that a newly-created context was made current during the last call to makeCurrent,...
abstract GLDrawable createGLDrawable(NativeSurface target)
Returns an unrealized GLDrawable according to it's chosen GLCapabilitiesImmutable,...
static GLDrawableFactory getFactory(final GLProfile glProfile)
Returns the sole GLDrawableFactory instance.
final GLDrawable drawable
WindowContext(final Window w, final GLDrawable d, final GLContext c)
static WindowContext createWindow(final GLCapabilities caps, final int width, final int height, final boolean debugGL)
static void destroyWindow(final WindowContext winctx)
static boolean waitForRealized(final Screen screen, final boolean realized, final Runnable waitAction)
static boolean waitForVisible(final Window win, final boolean visible, final Runnable waitAction)
Custom GLCapabilitiesChooser, filtering out all full screen anti-aliasing (FSAA, multisample) capabil...
Specifying NEWT's Window functionality:
CapabilitiesChooser setCapabilitiesChooser(CapabilitiesChooser chooser)
Set the CapabilitiesChooser to help determine the native visual type.
void setSize(int width, int height)
Sets the size of the window's client area in window units, excluding decorations.
void setVisible(boolean visible)
Calls setVisible(true, visible), i.e.
void destroy()
Destroys this window incl.releasing all related resources.
An abstraction for an OpenGL rendering target.
boolean isRealized()
Returns true if this drawable is realized, otherwise false.
void setRealized(boolean realized)
Indicates to GLDrawable implementations whether the underlying surface has been created and can be dr...
GLContext createContext(GLContext shareWith)
Creates a new context for drawing to this drawable that will optionally share buffer objects,...