Enabled OpenGL Core Profile on macOS

This commit is contained in:
alexey.lysiuk 2016-08-29 22:03:25 +03:00
parent 8f535997f8
commit b7ec26335f
2 changed files with 9 additions and 0 deletions

View file

@ -190,6 +190,9 @@ typedef NSInteger NSApplicationActivationPolicy;
static const NSWindowCollectionBehavior NSWindowCollectionBehaviorFullScreenAuxiliary = NSWindowCollectionBehavior(1 << 8);
static const NSOpenGLPixelFormatAttribute NSOpenGLPFAOpenGLProfile(96);
static const NSOpenGLPixelFormatAttribute NSOpenGLProfileVersion3_2Core(0x3200);
#endif // prior to 10.7
#endif // COCOA_I_COMMON_INCLUDED

View file

@ -501,6 +501,12 @@ CocoaVideo::CocoaVideo(const int multisample)
attributes[i++] = NSOpenGLPixelFormatAttribute(multisample);
}
if (NSAppKitVersionNumber >= AppKit10_7)
{
attributes[i++] = NSOpenGLPFAOpenGLProfile;
attributes[i++] = NSOpenGLProfileVersion3_2Core;
}
attributes[i] = NSOpenGLPixelFormatAttribute(0);
// Create OpenGL context and view