summaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/GLDrawableImpl.java')
-rw-r--r--src/classes/com/sun/opengl/impl/GLDrawableImpl.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
index f93ed9663..df1aab796 100644
--- a/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
+++ b/src/classes/com/sun/opengl/impl/GLDrawableImpl.java
@@ -42,6 +42,8 @@ package com.sun.opengl.impl;
import javax.media.opengl.*;
public abstract class GLDrawableImpl implements GLDrawable {
+ private GLCapabilities chosenCapabilities;
+
/** For offscreen GLDrawables (pbuffers and "pixmap" drawables),
indicates that native resources should be reclaimed. */
public abstract void destroy() throws GLException;
@@ -49,4 +51,16 @@ public abstract class GLDrawableImpl implements GLDrawable {
public static String toHexString(long hex) {
return GLContextImpl.toHexString(hex);
}
+
+ public GLCapabilities getChosenGLCapabilities() {
+ if (chosenCapabilities == null)
+ return null;
+
+ // Must return a new copy to avoid mutation by end user
+ return (GLCapabilities) chosenCapabilities.clone();
+ }
+
+ public void setChosenGLCapabilities(GLCapabilities caps) {
+ chosenCapabilities = caps;
+ }
}