diff --git a/src/osx/cocoa/glcanvas.mm b/src/osx/cocoa/glcanvas.mm index 8783ef4f1c..6d14ae1ac0 100644 --- a/src/osx/cocoa/glcanvas.mm +++ b/src/osx/cocoa/glcanvas.mm @@ -234,12 +234,16 @@ WXGLPixelFormat WXGLChoosePixelFormat(const int *attribList) break; case WX_GL_CORE_PROFILE: + // NSOpenGLPFAOpenGLProfile and NSOpenGLProfileVersion3_2Core + // are only defined in 10.7 SDK, we can't support this + // attribute with 10.6. +#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 data[p++] = NSOpenGLPFAOpenGLProfile; // request an OpenGL core profile // will use the highest available OpenGL version // which will be at least 3.2 data[p++] = NSOpenGLProfileVersion3_2Core; - +#endif // 10.7+ break; } }