Skip to content

Commit

Permalink
Enabled code that requests an OpenGL 3 context.
Browse files Browse the repository at this point in the history
  • Loading branch information
BastiaanOlij committed Jan 4, 2017
1 parent 55d4258 commit 5e717ed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ os:

env:
#- GODOT_TARGET=iphone
#- GODOT_TARGET=osx
- GODOT_TARGET=osx
- GODOT_TARGET=x11
#- GODOT_TARGET=android
- GODOT_TARGET=windows
Expand Down
10 changes: 2 additions & 8 deletions platform/osx/os_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -987,24 +987,20 @@ 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];
[window_object setDelegate:window_delegate];
[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;

Expand All @@ -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);

Expand Down

0 comments on commit 5e717ed

Please sign in to comment.