summaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/Java2D.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/Java2D.java')
-rwxr-xr-xsrc/classes/com/sun/opengl/impl/Java2D.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/Java2D.java b/src/classes/com/sun/opengl/impl/Java2D.java
index 7d666e138..c3eaa3b7c 100755
--- a/src/classes/com/sun/opengl/impl/Java2D.java
+++ b/src/classes/com/sun/opengl/impl/Java2D.java
@@ -52,6 +52,7 @@ public class Java2D {
private static boolean DEBUG = Debug.debug("Java2D");
private static boolean VERBOSE = Debug.verbose();
private static boolean isOGLPipelineActive;
+ private static boolean isFBOEnabled;
private static Method invokeWithOGLContextCurrentMethod;
private static Method isQueueFlusherThreadMethod;
private static Method getOGLViewportMethod;
@@ -110,6 +111,9 @@ public class Java2D {
Graphics.class
});
getOGLSurfaceIdentifierMethod.setAccessible(true);
+
+ String fbo = System.getProperty("sun.java2d.opengl.fbobject");
+ isFBOEnabled = (fbo != null) && "true".equals(fbo);
} catch (Exception e) {
if (DEBUG && VERBOSE) {
e.printStackTrace();
@@ -130,6 +134,10 @@ public class Java2D {
return isOGLPipelineActive;
}
+ public static boolean isFBOEnabled() {
+ return isFBOEnabled;
+ }
+
public static boolean isQueueFlusherThread() {
if (!isOGLPipelineActive()) {
throw new GLException("Java2D OpenGL pipeline not active (or necessary support not present)");