diff options
author | Sven Gothel <[email protected]> | 2014-10-02 00:59:51 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-10-02 00:59:51 +0200 |
commit | 1b5c2dbc9204a85eb63cea952b289f5012690f35 (patch) | |
tree | dc910094e94eabe539dd9b9665765ce6641d7bf6 /src/jogl/classes/jogamp/opengl/GLContextImpl.java | |
parent | 5d3caefa4ded044b2965d7e046e9c9fa35d58810 (diff) |
Bug 1078: Fix commit 99f91f8b28d42cdf341533736e878056bcae4708 (GLRendererQuirks.NoPBufferWithAccum): Accum buffer allowed if !usePBuffer; Avoid NPE.
99f91f8b28d42cdf341533736e878056bcae4708
Diffstat (limited to 'src/jogl/classes/jogamp/opengl/GLContextImpl.java')
-rw-r--r-- | src/jogl/classes/jogamp/opengl/GLContextImpl.java | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/jogl/classes/jogamp/opengl/GLContextImpl.java b/src/jogl/classes/jogamp/opengl/GLContextImpl.java index 02557b7e1..efd8b2860 100644 --- a/src/jogl/classes/jogamp/opengl/GLContextImpl.java +++ b/src/jogl/classes/jogamp/opengl/GLContextImpl.java @@ -1740,8 +1740,19 @@ public abstract class GLContextImpl extends GLContext { final boolean isX11 = NativeWindowFactory.TYPE_X11 == NativeWindowFactory.getNativeWindowType(true); final boolean isWindows = Platform.getOSType() == Platform.OSType.WINDOWS; final boolean isDriverMesa = glRenderer.contains(MesaSP) || glRenderer.contains("Gallium "); - final boolean isDriverATICatalyst = !isDriverMesa && ( glVendor.contains("ATI Technologies") || glRenderer.startsWith("ATI ") ); - final boolean isDriverNVIDIAGeForce = !isDriverMesa && ( glVendor.contains("NVIDIA Corporation") || glRenderer.contains("NVIDIA ") ); + + final boolean isDriverATICatalyst; + final boolean isDriverNVIDIAGeForce; + final boolean isDriverIntel; + if( !isDriverMesa ) { + isDriverATICatalyst = glVendor.contains("ATI Technologies") || glRenderer.startsWith("ATI "); + isDriverNVIDIAGeForce = glVendor.contains("NVIDIA Corporation") || glRenderer.contains("NVIDIA "); + isDriverIntel = glVendor.startsWith("Intel"); + } else { + isDriverATICatalyst = false; + isDriverNVIDIAGeForce = false; + isDriverIntel = false; + } final GLRendererQuirks quirks = new GLRendererQuirks(); @@ -1840,8 +1851,7 @@ public abstract class GLContextImpl extends GLContext { } quirks.addQuirk( quirk ); } - } - if (glVendor.equals("Intel") && glRenderer.equals("Intel Bear Lake B")) { + } else if( isDriverIntel && glRenderer.equals("Intel Bear Lake B") ) { final int quirk = GLRendererQuirks.NoPBufferWithAccum; if(DEBUG) { System.err.println("Quirk: "+GLRendererQuirks.toString(quirk)+": cause: OS "+Platform.getOSType()+", [Vendor "+glVendor+" and Renderer "+glRenderer+"]"); |