aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/GLContextImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/GLContextImpl.java')
-rw-r--r--src/classes/com/sun/opengl/impl/GLContextImpl.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLContextImpl.java b/src/classes/com/sun/opengl/impl/GLContextImpl.java
index 8963b2f5e..d363cfe80 100644
--- a/src/classes/com/sun/opengl/impl/GLContextImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLContextImpl.java
@@ -50,6 +50,7 @@ public abstract class GLContextImpl extends GLContext {
protected static final boolean DEBUG = Debug.debug("GLContextImpl");
protected static final boolean VERBOSE = Debug.verbose();
protected static final boolean NO_FREE = Debug.isPropertyDefined("jogl.GLContext.nofree");
+ protected boolean optimizationEnabled = !Debug.isPropertyDefined("jogl.GLContext.noopt");
// Cache of the functions that are available to be called at the current
// moment in time
@@ -351,6 +352,11 @@ public abstract class GLContextImpl extends GLContext {
return "0x" + Long.toHexString(hex);
}
+ //---------------------------------------------------------------------------
+ // Helpers for integration with Java2D/OpenGL pipeline when FBOs are
+ // being used
+ //
+
public void setObjectTracker(GLObjectTracker tracker) {
this.tracker = tracker;
}
@@ -367,6 +373,15 @@ public abstract class GLContextImpl extends GLContext {
return deletedObjectTracker;
}
+ //---------------------------------------------------------------------------
+ // Helpers for context optimization where the last context is left
+ // current on the OpenGL worker thread
+ //
+
+ public boolean isOptimizable() {
+ return optimizationEnabled;
+ }
+
public boolean hasWaiters() {
return lock.hasWaiters();
}