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.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
index d69b02bb9..654d286d3 100644
--- a/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
+++ b/src/jogl/classes/jogamp/opengl/GLGraphicsConfigurationUtil.java
@@ -287,7 +287,7 @@ public class GLGraphicsConfigurationUtil {
return capsRequested;
}
- public static GLCapabilitiesImmutable clipRGBAGLCapabilities(GLCapabilitiesImmutable caps, boolean allowRGB555)
+ public static GLCapabilitiesImmutable clipRGBAGLCapabilities(GLCapabilitiesImmutable caps, boolean allowRGB555, boolean allowAlpha)
{
final int iR = caps.getRedBits();
final int iG = caps.getGreenBits();
@@ -296,7 +296,7 @@ public class GLGraphicsConfigurationUtil {
final int oR = clipColor(iR, allowRGB555);
final int oG = clipColor(iG, allowRGB555);
final int oB = clipColor(iB, allowRGB555);
- final int oA = 0 < iA ? oR : 0 ; // align alpha to red if requested
+ final int oA = ( allowAlpha && 0 < iA ) ? oR : 0 ; // align alpha to red if requested and allowed
if( iR != oR || iG != oG || iB != oB || iA != oA ) {
final GLCapabilities caps2 = (GLCapabilities) caps.cloneMutable();
caps2.setRedBits(oR);