


Depending on the window manager, the size of a hidden window's framebuffer may not be usable or modifiable, so framebuffer objects are recommended for rendering with such contexts. The window never needs to be shown and its context can be used as a plain offscreen context. When creating a window and its OpenGL or OpenGL ES context with glfwCreateWindow, you can specify another window whose context the new one should share its objects (textures, vertex and element buffers, etc.) with. See context related hints in the window guide. There are a number of hints, specified using glfwWindowHint, related to what kind of context is created. For more information, see the Vulkan guide. If you will be using Vulkan to render to a window, disable context creation by setting the GLFW_CLIENT_API hint to GLFW_NO_API. Note Vulkan does not have a context and the Vulkan instance is created via the Vulkan API itself. To test the creation of various kinds of contexts and see their properties, run the glfwinfo test program. See Window creation for more information.Īs the window and context are inseparably linked, the window object also serves as the context handle. It is created with glfwCreateWindow and destroyed with glfwDestroyWindow or glfwTerminate. There are also guides for the other areas of the GLFW API.Ī window object encapsulates both a top-level window and an OpenGL or OpenGL ES context. For details on a specific function in this category, see the Context reference. This guide introduces the OpenGL and OpenGL ES context related functions of GLFW.
