Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Implemented SDL_GL_SHARE_WITH_CURRENT_CONTEXT for Mac OS X.

  • Loading branch information
flibitijibibo committed May 6, 2013
1 parent 0947e89 commit 7d82dbc3a86abdbef6df59ef2e41caf7ce1937a1
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/video/cocoa/SDL_cocoaopengl.m
@@ -90,6 +90,7 @@
NSOpenGLPixelFormatAttribute attr[32];
NSOpenGLPixelFormat *fmt;
NSOpenGLContext *context;
NSOpenGLContext *share_context = nil;
int i = 0;

if (_this->gl_config.profile_mask == SDL_GL_CONTEXT_PROFILE_ES) {
@@ -182,7 +183,11 @@
return NULL;
}

context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:nil];
if (_this->gl_config.share_with_current_context) {
share_context = (NSOpenGLContext*)(_this->current_glctx);
}

context = [[NSOpenGLContext alloc] initWithFormat:fmt shareContext:share_context];

[fmt release];

0 comments on commit 7d82dbc

Please sign in to comment.