diff options
author | Kenneth Russel <kbrussel@alum.mit.edu> | 2006-08-14 18:43:38 +0000 |
---|---|---|
committer | Kenneth Russel <kbrussel@alum.mit.edu> | 2006-08-14 18:43:38 +0000 |
commit | c6bc4b3e6c55749fa4cfd371f76a10f1ebfbe069 (patch) | |
tree | 06121ab1343fc3a64807ee2cc69485f3df35cbda /src/classes/com/sun/opengl/impl | |
parent | 2d11fc7a5131c31a71df57f2be4981721633122b (diff) |
Fixed Issue 242: Unable to select single-buffered visual
Fixed GLX_DOUBLEBUFFER and GLX_STEREO specifications for both
on-screen and pbuffer visuals as per suggestion.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@885 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/classes/com/sun/opengl/impl')
-rw-r--r-- | src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java index bf78c5f0e..b1863d41c 100644 --- a/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java +++ b/src/classes/com/sun/opengl/impl/x11/X11GLDrawableFactory.java @@ -361,14 +361,27 @@ public class X11GLDrawableFactory extends GLDrawableFactoryImpl { } else { res[idx++] = GLX.GLX_RGBA; } - res[idx++] = GLX.GLX_DOUBLEBUFFER; if (caps.getDoubleBuffered()) { - res[idx++] = GL.GL_TRUE; + res[idx++] = GLX.GLX_DOUBLEBUFFER; + if (pbuffer) { + res[idx++] = GL.GL_TRUE; + } } else { - res[idx++] = GL.GL_FALSE; + if (pbuffer) { + res[idx++] = GLX.GLX_DOUBLEBUFFER; + res[idx++] = GL.GL_FALSE; + } } if (caps.getStereo()) { res[idx++] = GLX.GLX_STEREO; + if (pbuffer) { + res[idx++] = GL.GL_TRUE; + } + } else { + if (pbuffer) { + res[idx++] = GLX.GLX_STEREO; + res[idx++] = GL.GL_FALSE; + } } res[idx++] = GLX.GLX_RED_SIZE; res[idx++] = caps.getRedBits(); |