mirror of
https://github.com/glfw/glfw.git
synced 2026-09-19 15:25:50 +00:00
Initialize context creation APIs on demand
This commit is contained in:
@@ -993,11 +993,15 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||
{
|
||||
if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
|
||||
{
|
||||
if (!_glfwInitWGL())
|
||||
return GLFW_FALSE;
|
||||
if (!_glfwCreateContextWGL(window, ctxconfig, fbconfig))
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_glfwInitEGL())
|
||||
return GLFW_FALSE;
|
||||
if (!_glfwCreateContextEGL(window, ctxconfig, fbconfig))
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user