From 1ad8c39df6b097c80ba7a85badf555e7f669cc3f Mon Sep 17 00:00:00 2001 From: Sven Gothel <sgothel@jausoft.com> Date: Sat, 24 Apr 2010 05:11:29 +0200 Subject: NEWT/AWT Interoperability - Moved all event classes to com.jogamp.newt.event and the new AWT event helper to com.jogamp.newt.awt.event - Added Newt<Type>Adapter for convenience - Added AWT<Type>Adapter for - Using AWT agnostic NEWT event listener see com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsNEWT even for AWT see com.jogamp.test.junit.jogl.demos.gl2.gears.TestGearsAWT (Nice idea by mbien) - Forwarding AWT events to NEWT (refactoring) Misc - GLDrawableFactory.shutdown() is now protected and called by the JVM shutdown hook. Hence removing the validate(). --- src/jogl/classes/javax/media/opengl/GLContext.java | 7 +++++++ src/jogl/classes/javax/media/opengl/GLDrawableFactory.java | 7 ------- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/javax/media/opengl') diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java index 2709dd506..c07bbeaf4 100644 --- a/src/jogl/classes/javax/media/opengl/GLContext.java +++ b/src/jogl/classes/javax/media/opengl/GLContext.java @@ -187,6 +187,13 @@ public abstract class GLContext { return (GLContext) currentContext.get(); } + /** + * @return true if this GLContext is current on this thread + */ + public final boolean isCurrent() { + return getCurrent() == this ; + } + /** * Sets the thread-local variable returned by {@link #getCurrent} * and has no other side-effects. For use by third parties adding diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java index b02bffb61..ca6bc7564 100644 --- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java +++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java @@ -168,13 +168,6 @@ public abstract class GLDrawableFactory { throw new GLException("No native platform GLDrawableFactory, nor EGLDrawableFactory available: "+glProfileImplName); } - /** Shuts down this GLDrawableFactory, releasing resources - associated with it. Before calling this method you should first - destroy any GLContexts and GLDrawables that have been created - and are still in use. No further OpenGL calls may be made after - shutting down the GLDrawableFactory. */ - public abstract void shutdown(); - //---------------------------------------------------------------------- // Methods to create high-level objects -- cgit v1.2.3