]> git.saurik.com Git - wxWidgets.git/blobdiff - src/unix/glx11.cpp
Refactor children traversal in wxWindow::TransferData{To,From}Window().
[wxWidgets.git] / src / unix / glx11.cpp
index c90b1fc3c467403064ff0579636bc0fd7094e640..05f9625a8c360bb928322df20bfad2259738ada0 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        src/univ/glx11.cpp
+// Name:        src/unix/glx11.cpp
 // Purpose:     code common to all X11-based wxGLCanvas implementations
 // Author:      Vadim Zeitlin
 // Created:     2007-04-15
 
 #include "wx/glcanvas.h"
 
+// IRIX headers call this differently
+#ifdef __SGI__
+    #ifndef GLX_SAMPLE_BUFFERS_ARB
+        #define GLX_SAMPLE_BUFFERS_ARB GLX_SAMPLE_BUFFERS_SGIS
+    #endif
+    #ifndef GLX_SAMPLES_ARB
+        #define GLX_SAMPLES_ARB GLX_SAMPLES_SGIS
+    #endif
+#endif // __SGI__
+
 // ============================================================================
 // wxGLContext implementation
 // ============================================================================
@@ -278,30 +288,33 @@ wxGLCanvasX11::ConvertWXAttrsToGL(const int *wxattrs, int *glattrs, size_t n)
                     break;
 
                 case WX_GL_SAMPLE_BUFFERS:
-                    if ( !IsGLXMultiSampleAvailable() )
+#ifdef GLX_SAMPLE_BUFFERS_ARB
+                    if ( IsGLXMultiSampleAvailable() )
                     {
-                        // if it was specified just to disable it, no problem
-                        if ( !wxattrs[arg++] )
-                            continue;
-
-                        // otherwise indicate that it's not supported
-                        return false;
+                        glattrs[p++] = GLX_SAMPLE_BUFFERS_ARB;
+                        break;
                     }
+#endif // GLX_SAMPLE_BUFFERS_ARB
+                    // if it was specified just to disable it, no problem
+                    if ( !wxattrs[arg++] )
+                        continue;
 
-                    glattrs[p++] = GLX_SAMPLE_BUFFERS_ARB;
-                    break;
+                    // otherwise indicate that it's not supported
+                    return false;
 
                 case WX_GL_SAMPLES:
-                    if ( !IsGLXMultiSampleAvailable() )
+#ifdef GLX_SAMPLES_ARB
+                    if ( IsGLXMultiSampleAvailable() )
                     {
-                        if ( !wxattrs[arg++] )
-                            continue;
-
-                        return false;
+                        glattrs[p++] = GLX_SAMPLES_ARB;
+                        break;
                     }
+#endif // GLX_SAMPLES_ARB
 
-                    glattrs[p++] = GLX_SAMPLES_ARB;
-                    break;
+                    if ( !wxattrs[arg++] )
+                        continue;
+
+                    return false;
 
                 default:
                     wxLogDebug(wxT("Unsupported OpenGL attribute %d"),