summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLRunnableTask.java
diff options
context:
space:
mode:
authorRami Santina <[email protected]>2011-08-09 20:51:12 +0300
committerRami Santina <[email protected]>2011-08-09 20:51:12 +0300
commit91d3bf4ea69046684540402cb1fd46e70682a6c5 (patch)
tree5da0ca5116e82617fa7a7a7ff5c3c2a7bf30617a /src/jogl/classes/jogamp/opengl/GLRunnableTask.java
parentf98a8e29b46b6cfbd2c3e695a02093b19468e95d (diff)
GLRunnable API Change: Return boolean indicating whether the back buffer shall be updated before swap.
This allows color selection GLRunnables, executed after the GLEventListener.
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLRunnableTask.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLRunnableTask.java8
1 files changed, 5 insertions, 3 deletions
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; }