Added context sharing.

This commit is contained in:
Camilla Berglund
2010-10-04 18:17:53 +02:00
parent 7a0be0f2eb
commit 99ddce3214
24 changed files with 97 additions and 62 deletions
+6 -1
View File
@@ -631,9 +631,14 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
return GL_FALSE;
}
NSOpenGLContext* share = NULL;
if (wndconfig->share)
share = wndconfig->share->NSGL.context;
window->NSGL.context =
[[NSOpenGLContext alloc] initWithFormat:window->NSGL.pixelFormat
shareContext:nil];
shareContext:share];
if (window->NSGL.context == nil)
{
_glfwSetError(GLFW_INTERNAL_ERROR);