mirror of
https://github.com/glfw/glfw.git
synced 2026-09-22 08:50:15 +00:00
Add GLFW_NO_API for creating context-less windows
This commit is contained in:
+5
-2
@@ -238,8 +238,11 @@ int _glfwPlatformCreateWindow(_GLFWwindow* window,
|
||||
const _GLFWctxconfig* ctxconfig,
|
||||
const _GLFWfbconfig* fbconfig)
|
||||
{
|
||||
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
|
||||
return GLFW_FALSE;
|
||||
if (ctxconfig->api != GLFW_NO_API)
|
||||
{
|
||||
if (!_glfwCreateContext(window, ctxconfig, fbconfig))
|
||||
return GLFW_FALSE;
|
||||
}
|
||||
|
||||
if (!createSurface(window, wndconfig))
|
||||
return GLFW_FALSE;
|
||||
|
||||
Reference in New Issue
Block a user