diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Window.zig | 1 | ||||
-rw-r--r-- | src/gfz.zig | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/Window.zig b/src/Window.zig index eba375c..4f22fa9 100644 --- a/src/Window.zig +++ b/src/Window.zig @@ -185,6 +185,7 @@ pub fn setShouldClose(self: Window, value: bool) Error!void { try checkError(); } +/// Swap the front and back buffers. pub fn swapBuffers(self: Window) Error!void { glfwSwapBuffers(self.pimpl); try checkError(); diff --git a/src/gfz.zig b/src/gfz.zig index 46bd247..d96f197 100644 --- a/src/gfz.zig +++ b/src/gfz.zig @@ -98,6 +98,12 @@ pub fn deinit() Error!void { try checkError(); } +/// Set the swap interval for the current context. +pub fn swapInterval(interval: c_int) Error!void { + glfwSwapInterval(interval); + try checkError(); +} + /// Process all pending events. pub fn pollEvents() Error!void { glfwPollEvents(); |