]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/glx11.cpp
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / src / unix / glx11.cpp
index d31f34c936a4b7c654b232e0d46503712ef9de22..b4a8b2d147c0f4add908ec1cb97ebe37d60233a5 100644 (file)
@@ -161,9 +161,6 @@ wxGLCanvasX11::ConvertWXAttrsToGL(const int *wxattrs, int *glattrs, size_t n)
             if ( p >= n - 2 )
                 return false;
 
-            // notice that for boolean attributes we use "continue" in the
-            // switch to skip the assignment of the attribute value at the end
-            // of the loop which is done for integer attributes
             switch ( wxattrs[arg++] )
             {
                 case WX_GL_RGBA:
@@ -175,6 +172,9 @@ wxGLCanvasX11::ConvertWXAttrsToGL(const int *wxattrs, int *glattrs, size_t n)
                     {
                         glattrs[p++] = GLX_RGBA;
                     }
+
+                    // use "continue" to skip the assignment of the attribute
+                    // value at the end of the loop
                     continue;
 
                 case WX_GL_BUFFER_SIZE:
@@ -185,13 +185,21 @@ wxGLCanvasX11::ConvertWXAttrsToGL(const int *wxattrs, int *glattrs, size_t n)
                     glattrs[p++] = GLX_LEVEL;
                     break;
 
+                    // the following boolean attributes don't have values in wx
+                    // API (they're turned on if specified) but do have them in
+                    // OpenGL, so do put them into glattrs and also skip the
+                    // copy of wx value after switch by using "continue"
+                    // instead of "break"
                 case WX_GL_DOUBLEBUFFER:
                     glattrs[p++] = GLX_DOUBLEBUFFER;
+                    glattrs[p++] = True;
                     continue;
 
                 case WX_GL_STEREO:
                     glattrs[p++] = GLX_STEREO;
-                    break;
+                    glattrs[p++] = True;
+                    continue;
+
 
                 case WX_GL_AUX_BUFFERS:
                     glattrs[p++] = GLX_AUX_BUFFERS;