Renamed context-related functions to more closely match underlying APIs.

This commit is contained in:
Camilla Berglund
2011-07-27 16:01:27 +02:00
parent 7268fc18b4
commit c1ab73b979
13 changed files with 103 additions and 102 deletions
+2 -15
View File
@@ -1342,7 +1342,7 @@ static int createWindow(_GLFWwindow* window,
if (!createContext(window, wndconfig, pixelFormat))
return GL_FALSE;
glfwMakeWindowCurrent(window);
glfwMakeContextCurrent(window);
initWGLExtensions(window);
@@ -1365,7 +1365,7 @@ static void destroyWindow(_GLFWwindow* window)
// This is duplicated from glfwCloseWindow
// TODO: Stop duplicating code
if (window == _glfwLibrary.currentWindow)
glfwMakeWindowCurrent(NULL);
glfwMakeContextCurrent(NULL);
// This is duplicated from glfwCloseWindow
// TODO: Stop duplicating code
@@ -1521,19 +1521,6 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
}
//========================================================================
// Make the OpenGL context associated with the specified window current
//========================================================================
void _glfwPlatformMakeWindowCurrent(_GLFWwindow* window)
{
if (window)
wglMakeCurrent(window->WGL.DC, window->WGL.context);
else
wglMakeCurrent(NULL, NULL);
}
//========================================================================
// Properly kill the window / video display
//========================================================================