From 1a4a48f2b5fc3ba7eed815bf1920801f4b0b429d Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 7 Feb 2005 01:04:57 +0000 Subject: Fixed Issue 136: Return correct pbuffer support for ATI cards Added a workaround in X11GLContext for bug in ATI's drivers where they report only GLX 1.2 support, but actually do support pbuffers. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@214 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/net/java/games/jogl/impl/x11/X11GLContext.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/net/java/games/jogl/impl/x11/X11GLContext.java b/src/net/java/games/jogl/impl/x11/X11GLContext.java index eb5c7fdf6..4709691f8 100644 --- a/src/net/java/games/jogl/impl/x11/X11GLContext.java +++ b/src/net/java/games/jogl/impl/x11/X11GLContext.java @@ -242,6 +242,17 @@ public abstract class X11GLContext extends GLContext { ", minor " + minor[0]); } + // Work around bugs in ATI's Linux drivers where they report they + // only implement GLX version 1.2 but actually do support pbuffers + if (major[0] == 1 && minor[0] == 2) { + GL gl = getGL(); + String str = gl.glGetString(GL.GL_VENDOR); + if (str != null && str.indexOf("ATI") >= 0) { + isGLX13 = true; + return; + } + } + isGLX13 = ((major[0] > 1) || (minor[0] > 2)); } -- cgit v1.2.3