final public static String[] getGLInfos(GLAutoDrawable drawable) { GL gl = drawable.getGL(); GLCapabilitiesImmutable c = drawable.getChosenGLCapabilities(); String[] ret = { c + "", c.getDoubleBuffered() + "", c.getStereo() + "", c.getStencilBits() + "", gl.getClass().getName(), gl.glGetString(GL.GL_VENDOR), gl.glGetString(GL.GL_RENDERER), gl.glGetString(GL.GL_VERSION) }; return ret; }
res.put(idx++, caps.getDoubleBuffered()?GL.GL_TRUE:GL.GL_FALSE); res.put(idx++, GLX.GLX_STEREO); res.put(idx++, caps.getStereo()?GL.GL_TRUE:GL.GL_FALSE); res.put(idx++, GLX.GLX_TRANSPARENT_TYPE); res.put(idx++, GLX.GLX_NONE); res.put(idx++, GLX.GLX_DOUBLEBUFFER); if (caps.getStereo()) { res.put(idx++, GLX.GLX_STEREO);
attrs.put(i++, CGL.kCGLPFADoubleBuffer); if (caps.getStereo()) { attrs.put(i++, CGL.kCGLPFAStereo);
if (caps.getStereo()) { iattributes.put(niattribs++, GL.GL_TRUE); } else {
ivalues.put(idx, (caps.getStereo() ? 1 : 0)); break;
@Override public boolean equals(final Object obj) { if(this == obj) { return true; } if(!(obj instanceof GLCapabilitiesImmutable)) { return false; } final GLCapabilitiesImmutable other = (GLCapabilitiesImmutable)obj; boolean res = super.equals(obj) && other.getGLProfile()==glProfile && other.isPBuffer()==isPBuffer && other.isFBO()==isFBO && other.getDoubleBuffered() == doubleBuffered && other.getStereo()==stereo && other.getHardwareAccelerated()==hardwareAccelerated && other.getDepthBits()==depthBits && other.getStencilBits()==stencilBits && other.getAccumRedBits()==accumRedBits && other.getAccumGreenBits()==accumGreenBits && other.getAccumBlueBits()==accumBlueBits && other.getAccumAlphaBits()==accumAlphaBits && other.getSampleBuffers()==sampleBuffers; if(res && sampleBuffers) { res = other.getNumSamples()==getNumSamples() && other.getSampleExtension().equals(sampleExtension) ; } return res; }
/** * Copies all {@link GLCapabilitiesImmutable} values * from <code>source</code> into this instance. * @return this instance */ public GLCapabilities copyFrom(final GLCapabilitiesImmutable source) { super.copyFrom(source); glProfile = source.getGLProfile(); isPBuffer = source.isPBuffer(); isFBO = source.isFBO(); doubleBuffered = source.getDoubleBuffered(); stereo = source.getStereo(); hardwareAccelerated = source.getHardwareAccelerated(); depthBits = source.getDepthBits(); stencilBits = source.getStencilBits(); accumRedBits = source.getAccumRedBits(); accumGreenBits = source.getAccumGreenBits(); accumBlueBits = source.getAccumBlueBits(); accumAlphaBits = source.getAccumAlphaBits(); sampleBuffers = source.getSampleBuffers(); numSamples = source.getNumSamples(); sampleExtension = source.getSampleExtension(); return this; }
if (caps.getStereo()) { pfdFlags |= GDI.PFD_STEREO;