Make GLFW_DOUBLEBUFFER a window attribute

This commit is contained in:
Camilla Löwy
2021-05-13 21:38:46 +02:00
parent da236ba807
commit 04f21abb52
5 changed files with 20 additions and 5 deletions
+1
View File
@@ -387,6 +387,7 @@ struct _GLFWwindow
GLFWbool mousePassthrough;
GLFWbool shouldClose;
void* userPointer;
GLFWbool doublebuffer;
GLFWvidmode videoMode;
_GLFWmonitor* monitor;
_GLFWcursor* cursor;
+4
View File
@@ -206,6 +206,8 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
window->mousePassthrough = wndconfig.mousePassthrough;
window->cursorMode = GLFW_CURSOR_NORMAL;
window->doublebuffer = fbconfig.doublebuffer;
window->minwidth = GLFW_DONT_CARE;
window->minheight = GLFW_DONT_CARE;
window->maxwidth = GLFW_DONT_CARE;
@@ -841,6 +843,8 @@ GLFWAPI int glfwGetWindowAttrib(GLFWwindow* handle, int attrib)
return window->floating;
case GLFW_AUTO_ICONIFY:
return window->autoIconify;
case GLFW_DOUBLEBUFFER:
return window->doublebuffer;
case GLFW_CLIENT_API:
return window->context.client;
case GLFW_CONTEXT_CREATION_API: