glfwSwapBuffers

Swaps the front and back buffers of the specified window.

This function swaps the front and back buffers of the specified window when rendering with OpenGL or OpenGL ES. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers.

The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a @ref GLFW_NO_WINDOW_CONTEXT error.

This function does not apply to Vulkan. If you are rendering with Vulkan, see vkQueuePresentKHR instead.

extern (C) @nogc nothrow __gshared
void
glfwSwapBuffers

Parameters

window GLFWwindow*

The window whose buffers to swap.

Errors: Possible errors include @ref GLFW_NOT_INITIALIZED, @ref GLFW_NO_WINDOW_CONTEXT and @ref GLFW_PLATFORM_ERROR.

@remark __EGL:__ The context of the specified window must be current on the calling thread.

Thread Safety

This function may be called from any thread.

@sa @ref buffer_swap @sa @ref glfwSwapInterval

Meta

Since

Added in version 1.0. @glfw3 Added window handle parameter.

Ingroup: window