(OSX) ifdef NSOpenGLPFAOpenGLProfile with MAC_OS_X_VERSION_10_7 - Core GL

profile only available from 10.7 and up
This commit is contained in:
twinaphex 2013-11-09 00:41:00 +01:00
parent 6670766bb6
commit 9b34000434

View File

@ -311,8 +311,12 @@ bool apple_gfx_ctx_bind_api(enum gfx_ctx_api api, unsigned major, unsigned minor
NSOpenGLPixelFormatAttribute attributes [] = {
NSOpenGLPFADoubleBuffer, // double buffered
NSOpenGLPFADepthSize, (NSOpenGLPixelFormatAttribute)16, // 16 bit depth buffer
(major || minor) ? NSOpenGLPFAOpenGLProfile : 0, (major << 12) | (minor << 8),
NSOpenGLPFADepthSize,
(NSOpenGLPixelFormatAttribute)16, // 16 bit depth buffer
#ifdef MAC_OS_X_VERSION_10_7
(major || minor) ? NSOpenGLPFAOpenGLProfile : 0,
(major << 12) | (minor << 8),
#endif
(NSOpenGLPixelFormatAttribute)nil
};