Top Description Inners Fields Constructors Methods
com.jogamp.newt.opengl

public Class GLWindow

extends GLAutoDrawableBase
implements GLAutoDrawable, Window, NEWTEventConsumer, FPSCounter
Class Inheritance
All Implemented Interfaces
com.jogamp.opengl.FPSCounter, com.jogamp.newt.event.NEWTEventConsumer, com.jogamp.newt.Window, com.jogamp.nativewindow.ScalableSurface, com.jogamp.nativewindow.WindowClosingProtocol, com.jogamp.nativewindow.NativeWindow, com.jogamp.nativewindow.NativeSurfaceHolder, com.jogamp.nativewindow.NativeSurface, com.jogamp.nativewindow.SurfaceUpdatedListener, com.jogamp.opengl.GLAutoDrawable, com.jogamp.opengl.GLDrawable
Imports
java.security.AccessController, .PrivilegedAction, java.util.List, com.jogamp.nativewindow.AbstractGraphicsConfiguration, .CapabilitiesChooser, .CapabilitiesImmutable, .NativeSurface, .NativeWindow, .NativeWindowException, .SurfaceUpdatedListener, com.jogamp.nativewindow.util.InsetsImmutable, .Point, .Rectangle, com.jogamp.opengl.FPSCounter, .GL, .GL3, .GL4ES3, .GLAnimatorControl, .GLAutoDrawable, .GLCapabilities, .GLCapabilitiesImmutable, .GLContext, .GLDrawable, .GLDrawableFactory, .GLES2, .GLES3, .GLEventListener, .GLException, .GLProfile, .GLRunnable, .GLSharedContextSetter, .JoglVersion, .GLStateKeeper, jogamp.newt.WindowImpl, jogamp.opengl.GLAutoDrawableBase, .GLContextImpl, .GLDrawableImpl, com.jogamp.common.GlueGenVersion, com.jogamp.common.util.VersionUtil, com.jogamp.common.util.locks.RecursiveLock, com.jogamp.newt.MonitorDevice, .NewtFactory, .Screen, .Window, .Display.PointerIcon, com.jogamp.newt.event.GestureHandler, .KeyListener, .MouseListener, .NEWTEvent, .NEWTEventConsumer, .NEWTEventListener, .WindowAdapter, .WindowEvent, .WindowListener, .WindowUpdateEvent

An implementation of GLAutoDrawable and Window interface, using a delegated Window instance, which may be an aggregation (lifecycle: created and destroyed).

This implementation supports GL state preservation, hence isGLStatePreservationSupported() returns true.

This implementation does not make the OpenGL context current
before calling the various input EventListener callbacks, ie MouseListener etc.
This design decision is made in favor of a more performant and simplified implementation. Also the event dispatcher shall be implemented OpenGL agnostic.
To be able to use OpenGL commands from within such input NEWTEventListener,
you can inject GLRunnable objects via invoke(boolean, GLRunnable) to the OpenGL command stream.

OpenGL Context Sharing
To share a GLContext see the following note in the documentation overview: context sharing as well as GLSharedContextSetter.

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected class

Field Summary

Modifier and TypeField and Description
private GLDrawableFactory
private final WindowImpl
Inherited from jogamp.opengl.GLAutoDrawableBase:
additionalCtxCreationFlagscontextDEBUGdefaultDisplayActiondefaultInitActiondrawablefpsCounterglelsglStateKeeperListenerhelperownsDevicepreserveGLELSAtDestroysendDestroysendReshape

Constructor Summary

AccessConstructor and Description
protected
GLWindow(final Window window)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public final boolean
public final void
addGestureHandler(final GestureHandler gh)

Implements com.jogamp.newt.Window.addGestureHandler.

Appends the given GestureHandler to the end of the list.
public final void
addGestureHandler(final int
Position where the listener will be inserted. Should be within (0 <= index && index <= size()). An index value of -1 is interpreted as the end of the list, size().
index
,
final GestureHandler
The listener object to be inserted
gh
)

Implements com.jogamp.newt.Window.addGestureHandler.

Inserts the given GestureHandler at the specified position in the list.
public final void
public final void
addGestureListener(final int
Position where the listener will be inserted. Should be within (0 <= index && index <= size()). An index value of -1 is interpreted as the end of the list, size().
index
,
final GestureHandler.GestureListener
The listener object to be inserted
gl
)

Implements com.jogamp.newt.Window.addGestureListener.

Inserts the given GestureHandler.GestureListener at the specified position in the list.
public final void
addKeyListener(final KeyListener l)

Implements com.jogamp.newt.Window.addKeyListener.

Appends the given com.jogamp.newt.event.KeyListener to the end of the list.
public final void
addKeyListener(final int
Position where the listener will be inserted. Should be within (0 <= index && index <= size()). An index value of -1 is interpreted as the end of the list, size().
index
,
final KeyListener
The listener object to be inserted
l
)

Implements com.jogamp.newt.Window.addKeyListener.

Inserts the given com.jogamp.newt.event.KeyListener at the specified position in the list.
public final void
addMouseListener(final MouseListener l)

Implements com.jogamp.newt.Window.addMouseListener.

Appends the given MouseListener to the end of the list.
public final void
addMouseListener(final int
Position where the listener will be inserted. Should be within (0 <= index && index <= size()). An index value of -1 is interpreted as the end of the list, size().
index
,
final MouseListener
The listener object to be inserted
l
)

Implements com.jogamp.newt.Window.addMouseListener.

Inserts the given MouseListener at the specified position in the list.
public final void
public final void
addSurfaceUpdatedListener(final int
Position where the listener will be inserted. Should be within (0 <= index && index <= size()). An index value of -1 is interpreted as the end of the list, size().
index
,
final SurfaceUpdatedListener
The listener object to be inserted
l
)

Implements com.jogamp.nativewindow.NativeSurface.addSurfaceUpdatedListener.

Inserts the given SurfaceUpdatedListener at the specified position in the list.
public final void
public final void
addWindowListener(final int
Position where the listener will be inserted. Should be within (0 <= index && index <= size()). An index value of -1 is interpreted as the end of the list, size().
index
,
final WindowListener
The listener object to be inserted
l
)

Implements com.jogamp.newt.Window.addWindowListener.

Inserts the given com.jogamp.newt.event.WindowListener at the specified position in the list.
public boolean
public final void
confinePointer(final boolean
defaults to false.
grab
)

Implements com.jogamp.newt.Window.confinePointer.

Confine the pointer to this window, ie.
public boolean
public final int[]
convertToPixelUnits(final int[]
int[2] storage holding the window units for the x- and y-coord to convert and the resulting values.
windowUnitsAndResult
)

Implements com.jogamp.nativewindow.NativeSurface.convertToPixelUnits.

Converts the given window units into pixel units in place.
public final int[]
convertToWindowUnits(final int[]
int[2] storage holding the pixel units for the x- and y-coord to convert and the resulting values.
pixelUnitsAndResult
)

Implements com.jogamp.nativewindow.NativeSurface.convertToWindowUnits.

Converts the given pixel units into window units in place.
public static GLWindow
create(final GLCapabilitiesImmutable caps)

Creates a new GLWindow attaching a new Window referencing a new default Screen and default Display with the given GLCapabilities.

public static GLWindow
create(final Screen screen, final GLCapabilitiesImmutable caps)

Creates a new GLWindow attaching a new Window referencing the given Screen with the given GLCapabilities.

public static GLWindow
create(final Window window)

Creates a new GLWindow attaching the given window.

public static GLWindow
create(final NativeWindow parentNativeWindow, final GLCapabilitiesImmutable caps)

Creates a new GLWindow attaching a new child Window of the given parentNativeWindow with the given GLCapabilities.

public final void
destroy()

Implements com.jogamp.opengl.GLAutoDrawable.destroy, com.jogamp.newt.Window.destroy.

Destroys all resources associated with this GLAutoDrawable, inclusive the GLContext.
public void
display()

Implements com.jogamp.opengl.GLAutoDrawable.display.

Causes OpenGL rendering to be performed for this GLAutoDrawable in the following order:

public final void
enqueueEvent(final boolean
Passing true will block until the event has been processed, otherwise method returns immediately.
wait
,
final NEWTEvent
The event to enqueue.
event
)

Implements com.jogamp.newt.Window.enqueueEvent.

Enqueues a NEWT event.
public final Rectangle
getBounds()

Implements com.jogamp.newt.Window.getBounds.

Returns a newly created Rectangle containing window origin, getX() & getY(), and size, getWidth() & getHeight(), in window units.
public final CapabilitiesImmutable
getChosenCapabilities()

Implements com.jogamp.newt.Window.getChosenCapabilities.

Gets an immutable set of chosen capabilities.
public final float[]
getCurrentSurfaceScale(final float[]
float[2] storage for the result
result
)

Implements com.jogamp.nativewindow.ScalableSurface.getCurrentSurfaceScale.

Returns the current pixel scale of the associated NativeSurface.
public WindowClosingProtocol.WindowClosingMode
public final Window
getDelegatedWindow()

Implements com.jogamp.newt.Window.getDelegatedWindow.

If the implementation uses delegation, return the delegated Window instance, otherwise return this instance.
public final long
getDisplayHandle()

Implements com.jogamp.nativewindow.NativeSurface.getDisplayHandle.

Convenience: Get display handle from AbstractGraphicsConfiguration .
public final GLDrawableFactory
getFactory()

Implements com.jogamp.opengl.GLDrawable.getFactory.

Return the GLDrawableFactory being used to create this instance.
public final AbstractGraphicsConfiguration
getGraphicsConfiguration()

Implements com.jogamp.nativewindow.NativeSurface.getGraphicsConfiguration.

Returns the graphics configuration corresponding to this window.
public final int
getHeight()

Implements com.jogamp.nativewindow.NativeWindow.getHeight.

Returns the height of the client area excluding insets (window decorations) in window units.
public final InsetsImmutable
getInsets()

Implements com.jogamp.nativewindow.NativeWindow.getInsets.

Returns the insets defined as the width and height of the window decoration on the left, right, top and bottom in window units.
public final KeyListener
public final KeyListener[]
public Point
getLocationOnScreen(final Point
Optional Point storage. If not null, null, it is translated about the resulting screen position and returned.
storage
)

Implements com.jogamp.nativewindow.NativeWindow.getLocationOnScreen.

Returns the window's top-left client-area position in the screen.
public final MonitorDevice
getMainMonitor()

Implements com.jogamp.newt.Window.getMainMonitor.

Returns the MonitorDevice with the highest viewport coverage of this window.
public final float[]
getMaximumSurfaceScale(final float[]
float[2] storage for the result
result
)

Implements com.jogamp.nativewindow.ScalableSurface.getMaximumSurfaceScale.

Returns the maximum pixel scale of the associated NativeSurface.
public final float[]
getMinimumSurfaceScale(final float[]
float[2] storage for the result
result
)

Implements com.jogamp.nativewindow.ScalableSurface.getMinimumSurfaceScale.

Returns the minimum pixel scale of the associated NativeSurface.
public final MouseListener
getMouseListener(final int index)

Implements com.jogamp.newt.Window.getMouseListener.

Returns the MouseListener from the list at the given index.
public final MouseListener[]
public final NativeWindow
public final float[]
getPixelsPerMM(final float[]
float[2] storage for the ppmm result
ppmmStore
)

Implements com.jogamp.newt.Window.getPixelsPerMM.

Returns the pixels per millimeter of this window's NativeSurface according to the main monitor's current mode's surface resolution.
public final Display.PointerIcon
getPointerIcon()

Implements com.jogamp.newt.Window.getPointerIcon.

Returns the current PointerIcon, which maybe null for the default.
public final CapabilitiesImmutable
getRequestedCapabilities()

Implements com.jogamp.newt.Window.getRequestedCapabilities.

Gets an immutable set of requested capabilities.
public final float[]
getRequestedSurfaceScale(final float[]
float[2] storage for the result
result
)

Implements com.jogamp.nativewindow.ScalableSurface.getRequestedSurfaceScale.

Returns the requested pixel scale of the associated NativeSurface.
public final Screen
public final int
getScreenIndex()

Implements com.jogamp.nativewindow.NativeSurface.getScreenIndex.

Convenience: Get display handle from AbstractGraphicsConfiguration .
public final int
getStateMask()

Implements com.jogamp.newt.Window.getStateMask.

Returns the current status mask of this instance.
public final String
getStateMaskString()

Implements com.jogamp.newt.Window.getStateMaskString.

Returns a string representation of the current state mask.
public final int
getStatePublicBitCount()

Implements com.jogamp.newt.Window.getStatePublicBitCount.

Number of all public state bits.
public final int
getStatePublicBitmask()

Implements com.jogamp.newt.Window.getStatePublicBitmask.

Bitmask covering all public state bits.
public final int
getSupportedStateMask()

Implements com.jogamp.newt.Window.getSupportedStateMask.

Returns the supported state mask of the implementation.
public final String
public final long
getSurfaceHandle()

Implements com.jogamp.nativewindow.NativeSurface.getSurfaceHandle.

Returns the handle to the surface for this NativeSurface.
public final int
public final Thread
getSurfaceLockOwner()

Implements com.jogamp.nativewindow.NativeSurface.getSurfaceLockOwner.

Return the locking owner's Thread, or null if not locked.
public final int
public final String
public final RecursiveLock
getUpstreamLock()

Implements com.jogamp.opengl.GLAutoDrawable.getUpstreamLock.

Returns the recursive lock object of the upstream widget to synchronize multithreaded access on top of NativeSurface#lockSurface().
public final Object
getUpstreamWidget()

Implements com.jogamp.opengl.GLAutoDrawable.getUpstreamWidget.

Method may return the upstream UI toolkit object holding this GLAutoDrawable instance, if exist.</td<></td<></td<></td<></td<>
public final int
getWidth()

Implements com.jogamp.nativewindow.NativeWindow.getWidth.

Returns the width of the client area excluding insets (window decorations) in window units.
public final long
getWindowHandle()

Implements com.jogamp.nativewindow.NativeWindow.getWindowHandle.

Returns the window handle for this NativeWindow.
public final WindowListener
public final WindowListener[]
public final int
getX()

Implements com.jogamp.nativewindow.NativeWindow.getX.

Returns the x position of the top-left corner of the client area relative to it's parent in window units.
public final int
getY()

Implements com.jogamp.nativewindow.NativeWindow.getY.

Returns the current y position of the top-left corner of the client area relative to it's parent in window units.
public boolean
hasFocus()

Implements com.jogamp.nativewindow.NativeWindow.hasFocus.

Returns true if this native window owns the focus, otherwise false.
public final boolean
public final boolean
public final boolean
isChildWindow()

Implements com.jogamp.newt.Window.isChildWindow.

Returns true if this window is a child window, i.e. has been reparented.
public final boolean
public final boolean
public final boolean
isKeyboardVisible()

Implements com.jogamp.newt.Window.isKeyboardVisible.

Return true if the virtual on-screen keyboard is visible, otherwise false.
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
public final boolean
isSurfaceLockedByOtherThread()

Implements com.jogamp.nativewindow.NativeSurface.isSurfaceLockedByOtherThread.

Query if surface is locked by another thread, i.e. not the current one.
public final boolean
public final boolean
public final int
lockSurface()

Implements com.jogamp.nativewindow.NativeSurface.lockSurface.

Lock the surface of this native window.
public static void
main(final String[] args)

A most simple JOGL AWT test entry

public final boolean
public final void
public final void
public final void
public final void
public final void
public final void
public final Window.ReparentOperation
reparentWindow(final NativeWindow
The new parent NativeWindow. If null, this Window becomes a top level window.
newParent
,
final int
new top-level position in window units, use -1 for default position.
x
,
final int
new top-level position in window units, use -1 for default position.
y
,
final int
May contain hints (bitfield values) like REPARENT_HINT_FORCE_RECREATION or REPARENT_HINT_BECOMES_VISIBLE.
hints
)

Implements com.jogamp.newt.Window.reparentWindow.

Change this window's parent window.
public final void
requestFocus()

Implements com.jogamp.newt.Window.requestFocus.

Request focus for this native window

The request is handled on this Window EDT and blocked until finished.

public final void
requestFocus(final boolean
true if waiting until the request is executed, otherwise false
wait
)

Implements com.jogamp.newt.Window.requestFocus.

Request focus for this native window

The request is handled on this Window EDT.

public final void
runOnEDTIfAvail(final boolean wait, final Runnable task)

Implements com.jogamp.newt.Window.runOnEDTIfAvail.

public void
public final void
setAlwaysOnBottom(final boolean value)

Implements com.jogamp.newt.Window.setAlwaysOnBottom.

Operation is ignored if this instance is a child window.

public final void
setAlwaysOnTop(final boolean value)

Implements com.jogamp.newt.Window.setAlwaysOnTop.

Operation is ignored if this instance is a child window.

public CapabilitiesChooser
setCapabilitiesChooser(final CapabilitiesChooser
the new CapabilitiesChooser
chooser
)

Implements com.jogamp.newt.Window.setCapabilitiesChooser.

Set the CapabilitiesChooser to help determine the native visual type.
public WindowClosingProtocol.WindowClosingMode
public void
setDefaultGesturesEnabled(final boolean enable)

Implements com.jogamp.newt.Window.setDefaultGesturesEnabled.

Enable or disable default GestureHandler.
public final void
setFocusAction(final Window.FocusRunnable focusAction)

Implements com.jogamp.newt.Window.setFocusAction.

Sets a FocusRunnable, which FocusRunnable#run() method is executed before the native focus is requested.
public final boolean
setFullscreen(final boolean
enable or disable fullscreen mode
fullscreen
)

Implements com.jogamp.newt.Window.setFullscreen.

Enable or disable fullscreen mode for this window.
public boolean
setFullscreen(final List<MonitorDevice>
if null fullscreen will be spanned across all MonitorDevices, otherwise across the given list of MonitorDevice.
monitors
)

Implements com.jogamp.newt.Window.setFullscreen.

Enable fullscreen mode for this window spanning across the given MonitorDevices or across all MonitorDevices.
public void
setKeyboardFocusHandler(final KeyListener l)

Implements com.jogamp.newt.Window.setKeyboardFocusHandler.

Sets a KeyListener allowing focus traversal with a covered window toolkit like AWT.
public final void
setKeyboardVisible(final boolean visible)

Implements com.jogamp.newt.Window.setKeyboardVisible.

In case the platform supports or even requires a virtual on-screen keyboard, this method shows or hide it depending on whether visible is true or false.
public final void
setMaximized(final boolean horz, final boolean vert)

Implements com.jogamp.newt.Window.setMaximized.

Operation is ignored if this instance is a child window.

public final void
setPointerIcon(final Display.PointerIcon
Valid PointerIcon reference or null to reset the pointer icon to default.
pi
)

Implements com.jogamp.newt.Window.setPointerIcon.

public final void
setPointerVisible(final boolean
defaults to true for platforms w/ visible pointer, otherwise defaults to true, eg. Android.
mouseVisible
)

Implements com.jogamp.newt.Window.setPointerVisible.

Makes the pointer visible or invisible.
public final void
setPosition(final int
coord of the client-area's top left corner in window units
x
,
final int
coord of the client-area's top left corner in window units
y
)

Implements com.jogamp.newt.Window.setPosition.

Sets the location of the window's client area excluding insets (window decorations) in window units.
public final void
setResizable(final boolean value)

Implements com.jogamp.newt.Window.setResizable.

Operation is ignored if this instance is a child window.

public final void
setSize(final int
of the window's client area in window units
width
,
final int
of the window's client area in window units
height
)

Implements com.jogamp.newt.Window.setSize.

Sets the size of the window's client area in window units, excluding decorations.
public final void
setSticky(final boolean value)

Implements com.jogamp.newt.Window.setSticky.

Operation is ignored if this instance is a child window.

public final boolean
setSurfaceScale(final float[]
requested surface pixel scale float[2] values for x- and y-direction.
pixelScale
)

Implements com.jogamp.nativewindow.ScalableSurface.setSurfaceScale.

Request a pixel scale in x- and y-direction for the associated NativeSurface, where size_in_pixel_units = pixel_scale * size_in_window_units.
public final void
setSurfaceSize(final int
of the window's client area in pixel units
pixelWidth
,
final int
of the window's client area in pixel units
pixelHeight
)

Implements com.jogamp.newt.Window.setSurfaceSize.

Sets the size of the window's surface in pixel units which claims the window's client area excluding decorations.
public final void
public void
setTopLevelPosition(final int
coord of the top-level left corner in window units
x
,
final int
coord of the top-level left corner in window units
y
)

Implements com.jogamp.newt.Window.setTopLevelPosition.

Sets the location of the top-level window inclusive insets (window decorations) in window units.
public void
setTopLevelSize(final int
of the top-level window area in window units
width
,
final int
of the top-level window area in window units
height
)

Implements com.jogamp.newt.Window.setTopLevelSize.

Sets the size of the top-level window including insets (window decorations) in window units.
public final void
setUndecorated(final boolean value)

Implements com.jogamp.newt.Window.setUndecorated.

public final void
setVisible(final boolean visible)

Implements com.jogamp.newt.Window.setVisible.

Calls setVisible(true, visible), i.e. blocks until the window becomes visible.
public void
setVisible(final boolean wait, final boolean visible)

Implements com.jogamp.newt.Window.setVisible.

setVisible(..) makes the window and children visible if visible is true, otherwise the window and children becomes invisible.
public void
setWindowDestroyNotifyAction(final Runnable r)

Implements com.jogamp.newt.Window.setWindowDestroyNotifyAction.

Set a custom action handling destruction issued by a toolkit triggered window destroy replacing the default destroy() action.
public final boolean
surfaceSwap()

Implements com.jogamp.nativewindow.NativeSurface.surfaceSwap.

Provide a mechanism to utilize custom (pre-) swap surface code.
public final void
surfaceUpdated(final Object
is the caller object who updated the surface, e.g. a JOGL GLDrawable.
updater
,
final NativeSurface
the updated NativeSurface
ns
,
final long
the time in ms, when the surface was updated
when
)

Implements com.jogamp.nativewindow.SurfaceUpdatedListener.surfaceUpdated.

Notification of a surface update event, eg.
public final void
swapBuffers()

Implements com.jogamp.opengl.GLDrawable.swapBuffers.

Swaps the front and back buffers of this drawable.
public final String
toString()

Overrides jogamp.opengl.GLAutoDrawableBase.toString.

Implements com.jogamp.opengl.GLDrawable.toString.

Returns a string representation of the object.
public final void
unlockSurface()

Implements com.jogamp.nativewindow.NativeSurface.unlockSurface.

Unlock the surface of this native window Shall not modify the surface handle, see lockSurface()

The implementation shall also invoke AbstractGraphicsDevice#unlock() for the final unlock (recursive count zero).

public final void
warpPointer(final int
relative pointer x position within this window in pixel units
x
,
final int
relative pointer y position within this window in pixel units
y
)

Implements com.jogamp.newt.Window.warpPointer.

Moves the pointer to x/y relative to this window's origin in pixel units.
public final void
windowRepaint(final int
dirty-region y-pos in pixel units
x
,
final int
dirty-region x-pos in pixel units
y
,
final int
dirty-region width in pixel units
width
,
final int
dirty-region height in pixel units
height
)

Implements com.jogamp.newt.Window.windowRepaint.

Trigger window repaint while passing the dirty region in pixel units.
Inherited from jogamp.opengl.GLAutoDrawableBase:
addGLEventListeneraddGLEventListenerareAllGLEventListenerInitializedclearPreservedGLStatecreateContextdefaultDestroydefaultDisplaydefaultDisposeGLEventListenerdefaultSwapBuffersdefaultWindowDestroyNotifyOpdefaultWindowRepaintOpdefaultWindowResizedOpdestroyAvoidAwareOfLockingdestroyImplInLockdisposeGLEventListenerflushGLRunnablesgetAnimatorgetAutoSwapBufferModegetChosenGLCapabilitiesgetContextgetContextCreationFlagsgetDelegatedDrawablegetExclusiveContextThreadgetFPSStartTimegetGLgetGLEventListenergetGLEventListenerCountgetGLEventListenerInitStategetGLProfilegetHandlegetLastFPSgetLastFPSPeriodgetLastFPSUpdateTimegetNativeSurfacegetPreservedGLStategetRequestedGLCapabilitiesgetThreadNamegetTotalFPSgetTotalFPSDurationgetTotalFPSFramesgetUpdateFPSFramesinvokeinvokeinvokeOnCurrentThreadinvokeOnNewThreadisGLOrientedisRealizedisThreadGLCapablepreserveGLEventListenerStatepreserveGLStateAtDestroyremoveGLEventListenerresetFPSCounterrestoreGLEventListenerStatesetAnimatorsetAutoSwapBufferModesetContextsetContextCreationFlagssetExclusiveContextThreadsetGLsetGLEventListenerInitStatesetGLStateKeeperListenersetRealizedsetSharedAutoDrawablesetSharedContextsetUpdateFPSFrames