aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java')
-rw-r--r--src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
index 19a664071..cc7a578cd 100644
--- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
+++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
@@ -145,4 +145,17 @@ public class GLGraphicsConfigurationUtil {
return capsRequested;
}
+ public static GLCapabilitiesImmutable fixOpaqueGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean isOpaque)
+ {
+ GLCapabilities caps2 = null;
+
+ if( capsRequested.isBackgroundOpaque() != isOpaque) {
+ // fix caps ..
+ caps2 = (GLCapabilities) capsRequested.cloneMutable();
+ caps2.setBackgroundOpaque(isOpaque);
+ return caps2;
+ }
+ return capsRequested;
+ }
+
}