From 969e427642d3b9be376cefaada9febd489b7b3d7 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sat, 26 Jun 2010 06:59:48 +0300 Subject: GLAutoDrawable: setAnimator/getAnimator/invoke/display changes; NEWT: Adding native repaint; NewtCanvasAWT focus fix 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. 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. The Animator un-/registers itself at the GLAutoDrawable via setAnimator. NEWT Window reparent always issues a resize() and display() call. NEWT native Window uses direct send.*Event for input events (again), instead of enqueueing it for performance. NEWT Window implements all status change and Java native event callbacks, instead of having duplicated code in all implementations. NewtCanvasAWT if the Newt window is focused, the AWT/Swing component[s] will loose the focus. --- src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java') diff --git a/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java b/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java index 071ac1378..c2efb3f4e 100644 --- a/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java +++ b/src/jogl/classes/com/jogamp/opengl/impl/GLPbufferImpl.java @@ -138,8 +138,16 @@ public class GLPbufferImpl implements GLPbuffer { drawableHelper.removeGLEventListener(listener); } + public void setAnimator(Thread animator) { + drawableHelper.setAnimator(animator); + } + + public Thread getAnimator() { + return drawableHelper.getAnimator(); + } + public void invoke(boolean wait, GLRunnable glRunnable) { - drawableHelper.invoke(wait, glRunnable); + drawableHelper.invoke(this, wait, glRunnable); } public void setContext(GLContext ctx) { -- cgit v1.2.3