mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-11 15:22:15 +00:00
Enabled OpenGL Core Profile on macOS
This commit is contained in:
parent
8f535997f8
commit
b7ec26335f
2 changed files with 9 additions and 0 deletions
|
@ -190,6 +190,9 @@ typedef NSInteger NSApplicationActivationPolicy;
|
||||||
|
|
||||||
static const NSWindowCollectionBehavior NSWindowCollectionBehaviorFullScreenAuxiliary = NSWindowCollectionBehavior(1 << 8);
|
static const NSWindowCollectionBehavior NSWindowCollectionBehaviorFullScreenAuxiliary = NSWindowCollectionBehavior(1 << 8);
|
||||||
|
|
||||||
|
static const NSOpenGLPixelFormatAttribute NSOpenGLPFAOpenGLProfile(96);
|
||||||
|
static const NSOpenGLPixelFormatAttribute NSOpenGLProfileVersion3_2Core(0x3200);
|
||||||
|
|
||||||
#endif // prior to 10.7
|
#endif // prior to 10.7
|
||||||
|
|
||||||
#endif // COCOA_I_COMMON_INCLUDED
|
#endif // COCOA_I_COMMON_INCLUDED
|
||||||
|
|
|
@ -501,6 +501,12 @@ CocoaVideo::CocoaVideo(const int multisample)
|
||||||
attributes[i++] = NSOpenGLPixelFormatAttribute(multisample);
|
attributes[i++] = NSOpenGLPixelFormatAttribute(multisample);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (NSAppKitVersionNumber >= AppKit10_7)
|
||||||
|
{
|
||||||
|
attributes[i++] = NSOpenGLPFAOpenGLProfile;
|
||||||
|
attributes[i++] = NSOpenGLProfileVersion3_2Core;
|
||||||
|
}
|
||||||
|
|
||||||
attributes[i] = NSOpenGLPixelFormatAttribute(0);
|
attributes[i] = NSOpenGLPixelFormatAttribute(0);
|
||||||
|
|
||||||
// Create OpenGL context and view
|
// Create OpenGL context and view
|
||||||
|
|
Loading…
Reference in a new issue