Initialize context creation APIs on demand

This commit is contained in:
Camilla Berglund
2016-07-20 12:52:06 +02:00
parent 52d801bd19
commit d5e00e6b0f
14 changed files with 28 additions and 17 deletions
+4
View File
@@ -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;
}