private final boolean isCurrentContextHardwareRasterizer() { boolean isHardwareRasterizer = true; if(!drawable.getChosenGLCapabilities().getHardwareAccelerated()) { isHardwareRasterizer = false; } else { isHardwareRasterizer = ! ( glRendererLowerCase.contains("software") /* Mesa3D, Apple */ || glRendererLowerCase.contains("mesa x11") /* Mesa3D */ || glRendererLowerCase.contains("softpipe") /* Gallium */ || glRendererLowerCase.contains("llvmpipe") /* Gallium */ ); } return isHardwareRasterizer; }
/* pp */ static void mapStaticGLESVersion(final AbstractGraphicsDevice device, final GLCapabilitiesImmutable caps) { final GLProfile glp = caps.getGLProfile(); final int[] reqMajorCTP = new int[2]; GLContext.getRequestMajorAndCompat(glp, reqMajorCTP); if( glp.isGLES() ) { if( reqMajorCTP[0] >= 3 ) { reqMajorCTP[1] |= GLContext.CTX_IMPL_ES3_COMPAT | GLContext.CTX_IMPL_ES2_COMPAT | GLContext.CTX_IMPL_FBO ; } else if( reqMajorCTP[0] >= 2 ) { reqMajorCTP[1] |= GLContext.CTX_IMPL_ES2_COMPAT | GLContext.CTX_IMPL_FBO ; } } if( !caps.getHardwareAccelerated() ) { reqMajorCTP[1] |= GLContext.CTX_IMPL_ACCEL_SOFT; } mapStaticGLVersion(device, reqMajorCTP[0], 0, reqMajorCTP[1]); } /* pp */ static void mapStaticGLVersion(final AbstractGraphicsDevice device, final int major, final int minor, final int ctp) {
break; case CGL.NSOpenGLPFANoRecovery: ivalues.put(idx, caps.getHardwareAccelerated() ? 1 : 0); break;
if(hardwareAccelerated && !caps.getHardwareAccelerated()) { return 1; } else if(!hardwareAccelerated && caps.getHardwareAccelerated()) { return -1;
final GLCapabilitiesImmutable capsChosen = (GLCapabilitiesImmutable) config.getChosenCapabilities(); boolean done = false; if( capsChosen.getHardwareAccelerated() && !capsChosen.isBitmap() ) { done = updateGraphicsConfigurationARB((WindowsWGLDrawableFactory)factory, config, chooser, hdc, extHDC, pfdIDs);
if (cur.getHardwareAccelerated()) { final int absScore = Math.abs(score); if (!gotHW || if (!cur.getHardwareAccelerated()) { if (score <= 0) { score -= maxAbsoluteHWScore;
@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; }