mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 00:30:57 +00:00
Added glfwIsWindow.
This commit is contained in:
+14
-1
@@ -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
|
||||
//========================================================================
|
||||
|
||||
Reference in New Issue
Block a user