aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/javax/media/opengl/GLJPanel.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/javax/media/opengl/GLJPanel.java')
-rw-r--r--src/classes/javax/media/opengl/GLJPanel.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/classes/javax/media/opengl/GLJPanel.java b/src/classes/javax/media/opengl/GLJPanel.java
index e69c03c2f..3340c75d4 100644
--- a/src/classes/javax/media/opengl/GLJPanel.java
+++ b/src/classes/javax/media/opengl/GLJPanel.java
@@ -793,6 +793,23 @@ public class GLJPanel extends JPanel implements GLAutoDrawable {
return oglPipelineEnabled;
}
+ public GLCapabilities getChosenGLCapabilities() {
+ if (oglPipelineEnabled) {
+ // FIXME: should do better than this; is it possible to using only platform-independent code?
+ return new GLCapabilities();
+ }
+
+ if (hardwareAccelerationDisabled) {
+ if (offscreenDrawable != null)
+ return offscreenDrawable.getChosenGLCapabilities();
+ } else {
+ if (pbuffer != null)
+ return pbuffer.getChosenGLCapabilities();
+ }
+
+ return null;
+ }
+
//----------------------------------------------------------------------
// Internals only below this point
//