mirror of
https://github.com/glfw/glfw.git
synced 2026-09-23 09:08:58 +00:00
Add GLFW_NO_API for creating context-less windows
This commit is contained in:
@@ -672,6 +672,13 @@ GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* handle)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(NULL);
|
||||
|
||||
if (window->context.api == GLFW_NO_API)
|
||||
{
|
||||
_glfwInputError(GLFW_NO_WINDOW_CONTEXT, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return window->wgl.context;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user