summaryrefslogtreecommitdiffstats
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.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
index 900d6a2a0..3f38f33bc 100644
--- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
+++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
@@ -177,14 +177,16 @@ public class GLGraphicsConfigurationUtil {
return capsRequested;
}
+ /** Fix opaque setting while preserve alpha bits */
public static GLCapabilitiesImmutable fixOpaqueGLCapabilities(GLCapabilitiesImmutable capsRequested, boolean isOpaque)
{
GLCapabilities caps2 = null;
if( capsRequested.isBackgroundOpaque() != isOpaque) {
- // fix caps ..
+ final int alphaBits = capsRequested.getAlphaBits();
caps2 = (GLCapabilities) capsRequested.cloneMutable();
caps2.setBackgroundOpaque(isOpaque);
+ caps2.setAlphaBits(alphaBits);
return caps2;
}
return capsRequested;