From 91d3bf4ea69046684540402cb1fd46e70682a6c5 Mon Sep 17 00:00:00 2001 From: Rami Santina Date: Tue, 9 Aug 2011 20:51:12 +0300 Subject: GLRunnable API Change: Return boolean indicating whether the back buffer shall be updated before swap. This allows color selection GLRunnables, executed after the GLEventListener. --- src/jogl/classes/jogamp/opengl/GLRunnableTask.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/jogamp/opengl/GLRunnableTask.java') diff --git a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java index e5b66b985..448f68423 100644 --- a/src/jogl/classes/jogamp/opengl/GLRunnableTask.java +++ b/src/jogl/classes/jogamp/opengl/GLRunnableTask.java @@ -50,10 +50,11 @@ public class GLRunnableTask implements GLRunnable { isExecuted = false; } - public void run(GLAutoDrawable drawable) { + public boolean run(GLAutoDrawable drawable) { + boolean res = true; if(null == notifyObject) { try { - runnable.run(drawable); + res = runnable.run(drawable); } catch (Throwable t) { runnableException = t; if(catchExceptions) { @@ -67,7 +68,7 @@ public class GLRunnableTask implements GLRunnable { } else { synchronized (notifyObject) { try { - runnable.run(drawable); + res = runnable.run(drawable); } catch (Throwable t) { runnableException = t; if(catchExceptions) { @@ -81,6 +82,7 @@ public class GLRunnableTask implements GLRunnable { } } } + return res; } public boolean isExecuted() { return isExecuted; } -- cgit v1.2.3