summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastiaanOlij <mux213@gmail.com>2017-01-04 23:58:20 +1100
committerBastiaanOlij <mux213@gmail.com>2017-01-05 00:05:34 +1100
commit5e717ed8a38dee1b6c722ad0827a764d45089cdb (patch)
tree20cbec3a7c832bb1910250c2e51cda5f559f3688
parent55d425807f6f1784d6ffd84586ae7efd77c1b352 (diff)
Enabled code that requests an OpenGL 3 context.
-rw-r--r--.travis.yml2
-rw-r--r--platform/osx/os_osx.mm10
2 files changed, 3 insertions, 9 deletions
diff --git a/.travis.yml b/.travis.yml
index f95df46a2b..12b49f4c07 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 a57a877fb8..f27eb98764 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -987,13 +987,11 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
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 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
[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 @@ void OS_OSX::initialize(const VideoMode& p_desired,int p_video_driver,int p_audi
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);