Added glfwIsWindow.

This commit is contained in:
Camilla Berglund
2010-09-09 18:42:41 +02:00
parent 39fd7a5ac1
commit 29a0ca47f9
3 changed files with 16 additions and 2 deletions
+14 -1
View File
@@ -565,7 +565,7 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
GLFWAPI void glfwMakeWindowCurrent(GLFWwindow window)
{
if (_glfwLibrary.currentWindow == window)
if (!_glfwInitialized || _glfwLibrary.currentWindow == window)
return;
_glfwPlatformMakeWindowCurrent(window);
@@ -573,6 +573,19 @@ GLFWAPI void glfwMakeWindowCurrent(GLFWwindow window)
}
//========================================================================
// Returns GL_TRUE if the specified window handle is an actual window
//========================================================================
GLFWAPI int glfwIsWindow(GLFWwindow window)
{
if (!_glfwInitialized)
return;
return window == _glfwLibrary.window;
}
//========================================================================
// Set hints for opening the window
//========================================================================