summaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/awt
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2013-02-12 04:07:24 +0100
committerSven Gothel <[email protected]>2013-02-12 04:07:24 +0100
commitd47794338ea218d1be2d21a91c8eea44d83dcb0a (patch)
treea49c2d32585b8c8412e1fb05caefa5d847675d78 /src/jogl/classes/javax/media/opengl/awt
parent6d508eb203fea16e094039b27a7368748aff122b (diff)
Java2D OGLPipeline(GLJPanel+Threading): More fine grained control about OGL threading and resource usage
- Still excluse OSX - Respect sun.java2d.opengl property - [Prepare] Allowing OGLPipeline thread usage w/o it's OGL resource usage
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/awt')
-rw-r--r--src/jogl/classes/javax/media/opengl/awt/GLJPanel.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
index 664edb996..864a5c91c 100644
--- a/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
+++ b/src/jogl/classes/javax/media/opengl/awt/GLJPanel.java
@@ -152,9 +152,9 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// Used by all backends either directly or indirectly to hook up callbacks
private Updater updater = new Updater();
- // Indicates whether the Java 2D OpenGL pipeline is enabled
- private boolean oglPipelineEnabled =
- Java2D.isOGLPipelineActive() &&
+ // Indicates whether the Java 2D OpenGL pipeline is enabled and resource-compatible
+ private boolean oglPipelineUsable =
+ Java2D.isOGLPipelineResourceCompatible() &&
!Debug.isPropertyDefined("jogl.gljpanel.noogl", true);
// For handling reshape events lazily
@@ -180,7 +180,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
// Force eager initialization of part of the Java2D class since
// otherwise it's likely it will try to be initialized while on
// the Queue Flusher Thread, which is not allowed
- if (Java2D.isOGLPipelineActive() && Java2D.isFBOEnabled()) {
+ if (Java2D.isOGLPipelineResourceCompatible() && Java2D.isFBOEnabled()) {
Java2D.getShareContext(GraphicsEnvironment.
getLocalGraphicsEnvironment().
getDefaultScreenDevice());
@@ -608,7 +608,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
to perform OpenGL rendering using the GLJPanel into the same
OpenGL drawable as the Swing implementation uses. */
public boolean shouldPreserveColorBufferIfTranslucent() {
- return oglPipelineEnabled;
+ return oglPipelineUsable;
}
@Override
@@ -662,7 +662,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
if ( null == backend ) {
- if (oglPipelineEnabled) {
+ if (oglPipelineUsable) {
backend = new J2DOGLBackend();
} else {
backend = new OffscreenBackend();
@@ -1560,7 +1560,7 @@ public class GLJPanel extends JPanel implements AWTGLAutoDrawable, WindowClosing
}
isInitialized = false;
backend = null;
- oglPipelineEnabled = false;
+ oglPipelineUsable = false;
handleReshape = true;
j2dContext.destroy();
j2dContext = null;