From a4b16ad544f3f7872f15e52d7ada7dc1e506d333 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 7 Jul 2010 15:02:13 +0200 Subject: GLAutoDrawable: setAnimator/getAnimator/invoke/display changes; NEWT: Adding native repaint; Fix reparent/fullscreen New: NEWT Native Repaint ========================= Support for native repaint, which shall call display() in case no animator is running. GLAutoDrawable invoke(GLRunnable) impl. handles case if invoked on animator thread, or no animator thread is running (issueing a display() call). The impl resides in GLDrawableHelper. The Animator un-/registers itself at the GLAutoDrawable via setAnimator. New: NEWT AWT/NEWT Parenting Focus Handling ============================================ Introducing Window.FocusRunnable, to be registered at the NEWT Window, which will be executed before the native focus claim. Window.FocusRunnable's run method returns a boolean, which determines whether the native implementation shall proceed claiming the native focus. This API focus hook is necessary to allow an optional underlying windowing toolkit, ie AWT (see usage NewtCanvasAWT), to make the focus traversal transparent. Fix: GLEventListener / GLDrawableHelper ======================================== GLEventListener's init() and glViewport()/reshape() method must be called before the 1st display() and after a dispose() call. It could miss the 1st display() call if added after the setVisible(true) call - due to the native repainting. The impl resides in GLDrawableHelper. Fix: Misc NEWT ============== Window reparent issues a resize() and display() call, if it is visible. native Window uses direct send.*Event for input events (again), instead of enqueueing it for performance. Window impl all status change native event Java callbacks, instead of having duplicated code in all implementations. Fullscreen, reposition at zero. Reparent/Fullscreen repaint if visible. Native reparent/fullscreen, fix glitches on Windows (visibility while reparenting) --- src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java | 2 +- .../com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java | 4 ++-- .../com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java | 4 ++-- .../classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/jogl/classes/com') diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java index 54d9b4e80..9fcddbbfa 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLContextImpl.java @@ -641,7 +641,7 @@ public abstract class GLContextImpl extends GLContext { // private Object createInstance(GLProfile glp, String suffix, Class[] cstrArgTypes, Object[] cstrArgs) { - return ReflectionUtil.createInstance(glp.getGLImplBaseClassName()+suffix, getClass().getClassLoader(), cstrArgTypes, cstrArgs); + return ReflectionUtil.createInstance(glp.getGLImplBaseClassName()+suffix, cstrArgTypes, cstrArgs, getClass().getClassLoader()); } /** Create the GL for this context. */ diff --git a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java index e71a78ffb..9694e5607 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/macosx/cgl/MacOSXCGLDrawableFactory.java @@ -78,8 +78,8 @@ public class MacOSXCGLDrawableFactory extends GLDrawableFactoryImpl { new MacOSXCGLGraphicsConfigurationFactory(); try { - ReflectionUtil.createInstance("com.jogamp.opengl.impl.macosx.cgl.awt.MacOSXAWTCGLGraphicsConfigurationFactory", getClass().getClassLoader(), - new Object[] {}); + ReflectionUtil.createInstance("com.jogamp.opengl.impl.macosx.cgl.awt.MacOSXAWTCGLGraphicsConfigurationFactory", + new Object[] {}, getClass().getClassLoader()); } catch (JogampRuntimeException jre) { /* n/a .. */ } } diff --git a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java index 353ed8ac3..85444b61c 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/windows/wgl/WindowsWGLDrawableFactory.java @@ -80,8 +80,8 @@ public class WindowsWGLDrawableFactory extends GLDrawableFactoryImpl { // The act of constructing them causes them to be registered new WindowsWGLGraphicsConfigurationFactory(); try { - ReflectionUtil.createInstance("com.jogamp.opengl.impl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory", getClass().getClassLoader(), - new Object[] {}); + ReflectionUtil.createInstance("com.jogamp.opengl.impl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory", + new Object[] {}, getClass().getClassLoader()); } catch (JogampRuntimeException jre) { /* n/a .. */ } try { diff --git a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java index c08c7c73f..98be19263 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/x11/glx/X11GLXDrawableFactory.java @@ -78,8 +78,8 @@ public class X11GLXDrawableFactory extends GLDrawableFactoryImpl { // The act of constructing them causes them to be registered new X11GLXGraphicsConfigurationFactory(); try { - ReflectionUtil.createInstance("com.jogamp.opengl.impl.x11.glx.awt.X11AWTGLXGraphicsConfigurationFactory", getClass().getClassLoader(), - new Object[] {}); + ReflectionUtil.createInstance("com.jogamp.opengl.impl.x11.glx.awt.X11AWTGLXGraphicsConfigurationFactory", + new Object[] {}, getClass().getClassLoader()); } catch (JogampRuntimeException jre) { /* n/a .. */ } // init shared resources .. -- cgit v1.2.3