mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 00:59:48 +00:00
Added context sharing.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user