29package com.jogamp.opengl.test.junit.util;
32import com.jogamp.nativewindow.NativeSurface;
33import com.jogamp.opengl.GLAutoDrawable;
34import com.jogamp.opengl.GLEventListener;
43 final Thread current = Thread.currentThread();
46 throw new RuntimeException(current.getName()+
": Locked by another thread(1), owner "+owner+
", "+ns);
48 if( current != owner ) {
50 throw new RuntimeException(current.getName()+
": Not locked: "+ns);
52 throw new RuntimeException(current.getName()+
": Locked by another thread(2), owner "+owner+
", "+ns);
57 validateLock(drawable);
60 public void reshape(
final GLAutoDrawable drawable,
final int x,
final int y,
final int width,
final int height) {
61 validateLock(drawable);
65 validateLock(drawable);
69 validateLock(drawable);
void init(final GLAutoDrawable drawable)
Called by the drawable immediately after the OpenGL context is initialized.
void reshape(final GLAutoDrawable drawable, final int x, final int y, final int width, final int height)
Called by the drawable during the first repaint after the component has been resized.
void dispose(final GLAutoDrawable drawable)
Notifies the listener to perform the release of all OpenGL resources per GLContext,...
void display(final GLAutoDrawable drawable)
Called by the drawable to initiate OpenGL rendering by the client.
AbstractGraphicsScreen getScreen()
Return the screen this graphics configuration is valid for.
AbstractGraphicsDevice getDevice()
Return the device this graphics configuration is valid for.
Provides low-level information required for hardware-accelerated rendering using a surface in a platf...
boolean isSurfaceLockedByOtherThread()
Query if surface is locked by another thread, i.e.
Thread getSurfaceLockOwner()
Return the locking owner's Thread, or null if not locked.
AbstractGraphicsConfiguration getGraphicsConfiguration()
Returns the graphics configuration corresponding to this window.
A higher-level abstraction than GLDrawable which supplies an event based mechanism (GLEventListener) ...
NativeSurface getNativeSurface()
Returns the associated NativeSurface of this NativeSurfaceHolder.
Declares events which client code can use to manage OpenGL rendering into a GLAutoDrawable.