diff options
-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(); |