From c6bc4b3e6c55749fa4cfd371f76a10f1ebfbe069 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Mon, 14 Aug 2006 18:43:38 +0000 Subject: 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 --- .../com/sun/opengl/impl/x11/X11GLDrawableFactory.java | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/classes/com/sun') 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(); -- cgit v1.2.3