attrs.put(idx++, caps.getBlueBits());
caps.getBlueBits()); if (colorDepth < 15) { throw new GLException("Bit depths < 15 (i.e., non-true-color) not supported"); res.put(idx++, caps.getGreenBits()); res.put(idx++, GLX.GLX_BLUE_SIZE); res.put(idx++, caps.getBlueBits()); if(caps.getAlphaBits()>0) { res.put(idx++, GLX.GLX_ALPHA_SIZE);
attrs.put(i++, ( caps.getRedBits() + caps.getGreenBits() + caps.getBlueBits() ) ); attrs.put(i++, CGL.kCGLPFAAlphaSize); attrs.put(i++, caps.getAlphaBits());
iattributes.put(niattribs++, caps.getGreenBits()); iattributes.put(niattribs++, WGLExt.WGL_BLUE_BITS_ARB); iattributes.put(niattribs++, caps.getBlueBits()); if(caps.getAlphaBits()>0) { iattributes.put(niattribs++, WGLExt.WGL_ALPHA_BITS_ARB);
ivalues.put(idx, (caps.getRedBits() + caps.getGreenBits() + caps.getBlueBits())); break;
if ((getGLInteger(gl, GL.GL_RED_BITS) < reqOffscreenCaps.getRedBits()) || (getGLInteger(gl, GL.GL_GREEN_BITS) < reqOffscreenCaps.getGreenBits()) || (getGLInteger(gl, GL.GL_BLUE_BITS) < reqOffscreenCaps.getBlueBits()) || System.err.println("GL_RED_BITS " + getGLInteger(gl, GL.GL_RED_BITS) + " " + reqOffscreenCaps.getRedBits()); System.err.println("GL_GREEN_BITS " + getGLInteger(gl, GL.GL_GREEN_BITS) + " " + reqOffscreenCaps.getGreenBits()); System.err.println("GL_BLUE_BITS " + getGLInteger(gl, GL.GL_BLUE_BITS) + " " + reqOffscreenCaps.getBlueBits()); System.err.println("GL_ALPHA_BITS " + getGLInteger(gl, GL.GL_ALPHA_BITS) + " " + reqOffscreenCaps.getAlphaBits()); System.err.println("GL_ACCUM_RED_BITS " + getGLInteger(gl, GL2.GL_ACCUM_RED_BITS) + " " + reqOffscreenCaps.getAccumRedBits());
((cur.getRedBits() + cur.getGreenBits() + cur.getBlueBits() + cur.getAlphaBits()) - (gldes.getRedBits() + gldes.getGreenBits() + gldes.getBlueBits() + gldes.getAlphaBits())));
public static GLCapabilitiesImmutable clipRGBAGLCapabilities(final GLCapabilitiesImmutable caps, final boolean allowRGB555, final boolean allowAlpha) { final int iR = caps.getRedBits(); final int iG = caps.getGreenBits(); final int iB = caps.getBlueBits(); final int iA = caps.getAlphaBits(); final int oR = clipColor(iR, allowRGB555); final int oG = clipColor(iG, allowRGB555); final int oB = clipColor(iB, allowRGB555); 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); caps2.setGreenBits(oG); caps2.setBlueBits(oB); caps2.setAlphaBits(oA); return caps2; } return caps; }
final int bitsPerPixelIn = capsChosen.getRedBits() + capsChosen.getGreenBits() + capsChosen.getBlueBits(); final int bitsPerPixel;
static PIXELFORMATDESCRIPTOR GLCapabilities2PFD(final GLCapabilitiesImmutable caps, final PIXELFORMATDESCRIPTOR pfd) { final int colorDepth = (caps.getRedBits() + caps.getGreenBits() + caps.getBlueBits()); if (colorDepth < 15) { throw new GLException("Bit depths < 15 (i.e., non-true-color) not supported"); pfd.setCRedBits ((byte) caps.getRedBits()); pfd.setCGreenBits((byte) caps.getGreenBits()); pfd.setCBlueBits ((byte) caps.getBlueBits()); pfd.setCAlphaBits((byte) caps.getAlphaBits()); final int accumDepth = (caps.getAccumRedBits() +