Fixed bug 1946 - OpenGL contexts in threads
The SDL OpenGL context code is now properly thread aware. There are two new functions which return the current OpenGL window and context for the current thread. There are still places in the cocoa driver where the OpenGL context needs to be updated when the view changes. These will need a different solution and still use the last globally set context to avoid changing behavior.
This commit is contained in:
parent
de2ec2b443
commit
35275fc714
6 changed files with 57 additions and 21 deletions
|
@ -535,7 +535,7 @@ WIN_GL_CreateContext(_THIS, SDL_Window * window)
|
|||
HGLRC context, share_context;
|
||||
|
||||
if (_this->gl_config.share_with_current_context) {
|
||||
share_context = (HGLRC)(_this->current_glctx);
|
||||
share_context = (HGLRC)SDL_GL_GetCurrentContext();
|
||||
} else {
|
||||
share_context = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue