瀏覽代碼

Add tracking of single-/double-buffering

This adds the state part of 04f21abb52e557addb932af1634b29658fd3a6ae
(Make GLFW_DOUBLEBUFFER a window attribute), but without the associated
API change, because this is needed by later bug fixes that will go into
the stable branch.
Camilla Löwy 4 年之前
父節點
當前提交
508e24c01c
共有 2 個文件被更改,包括 3 次插入0 次删除
  1. 1 0
      src/internal.h
  2. 2 0
      src/window.c

+ 1 - 0
src/internal.h

@@ -375,6 +375,7 @@ struct _GLFWwindow
     GLFWbool            focusOnShow;
     GLFWbool            shouldClose;
     void*               userPointer;
+    GLFWbool            doublebuffer;
     GLFWvidmode         videoMode;
     _GLFWmonitor*       monitor;
     _GLFWcursor*        cursor;

+ 2 - 0
src/window.c

@@ -205,6 +205,8 @@ GLFWAPI GLFWwindow* glfwCreateWindow(int width, int height,
     window->focusOnShow = wndconfig.focusOnShow;
     window->cursorMode  = GLFW_CURSOR_NORMAL;
 
+    window->doublebuffer = fbconfig.doublebuffer;
+
     window->minwidth    = GLFW_DONT_CARE;
     window->minheight   = GLFW_DONT_CARE;
     window->maxwidth    = GLFW_DONT_CARE;