Cleanup of context clearing during window destruction.

This commit is contained in:
Camilla Berglund
2012-10-21 21:57:29 +02:00
parent b87157ccc1
commit 467d501621
5 changed files with 10 additions and 12 deletions
+8
View File
@@ -947,8 +947,16 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
// we're just creating an OpenGL 3.0+ context with the same pixel
// format, but it's not worth the added code complexity
// First we clear the current context (the one we just created)
// This is usually done by glfwDestroyWindow, but as we're not doing
// full window destruction, it's duplicated here
_glfwPlatformMakeContextCurrent(NULL);
// Next destroy the Win32 window and WGL context (without resetting or
// destroying the GLFW window object)
destroyWindow(window);
// ...and then create them again, this time with better APIs
if (!createWindow(window, wndconfig, fbconfig))
return GL_FALSE;
}