From 5e717ed8a38dee1b6c722ad0827a764d45089cdb Mon Sep 17 00:00:00 2001 From: BastiaanOlij Date: Wed, 4 Jan 2017 23:58:20 +1100 Subject: [PATCH] Enabled code that requests an OpenGL 3 context. --- .travis.yml | 2 +- platform/osx/os_osx.mm | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index f95df46a2b28..12b49f4c07d5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ os: env: #- GODOT_TARGET=iphone - #- GODOT_TARGET=osx + - GODOT_TARGET=osx - GODOT_TARGET=x11 #- GODOT_TARGET=android - GODOT_TARGET=windows diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index a57a877fb802..f27eb9876401 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -987,13 +987,11 @@ static void keyboardLayoutChanged(CFNotificationCenterRef center, void *observer window_size.width = p_desired.width; window_size.height = p_desired.height; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6 && display_scale>1) { [window_view setWantsBestResolutionOpenGLSurface:YES]; //if (current_videomode.resizable) [window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; } -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ // [window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]]; [window_object setContentView:window_view]; @@ -1001,10 +999,8 @@ static void keyboardLayoutChanged(CFNotificationCenterRef center, void *observer [window_object setAcceptsMouseMovedEvents:YES]; [window_object center]; -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6) [window_object setRestorable:NO]; -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ unsigned int attributeCount = 0; @@ -1023,10 +1019,8 @@ static void keyboardLayoutChanged(CFNotificationCenterRef center, void *observer ADD_ATTR(NSOpenGLPFADoubleBuffer); ADD_ATTR(NSOpenGLPFAClosestPolicy); -#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - if (false/* use gl3*/) - ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); -#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ +// we now need OpenGL 3 or better, maybe even change this to 3_3Core ? + ADD_ATTR2(NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core); ADD_ATTR2(NSOpenGLPFAColorSize, colorBits);