From d68d0dd72fbeccbc2f467711f38f7cba204cb49c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 23 Sep 2015 03:37:36 +0200 Subject: [PATCH] Build fix for wxOSX build with 10.6 SDK after last commit OpenGL core profile constants only exist in 10.7 SDK, don't use them when compiling with 10.6 one. See #16402. --- src/osx/cocoa/glcanvas.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } }