mirror of
https://github.com/glfw/glfw.git
synced 2026-09-20 16:30:45 +00:00
Initialize context creation APIs on demand
This commit is contained in:
@@ -1514,11 +1514,15 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||
{
|
||||
if (ctxconfig->source == GLFW_NATIVE_CONTEXT_API)
|
||||
{
|
||||
if (!_glfwInitGLX())
|
||||
return GLFW_FALSE;
|
||||
if (!_glfwChooseVisualGLX(ctxconfig, fbconfig, &visual, &depth))
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!_glfwInitEGL())
|
||||
return GLFW_FALSE;
|
||||
if (!_glfwChooseVisualEGL(ctxconfig, fbconfig, &visual, &depth))
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user