Context Basics
Basics you need to know about GLFW contexts
Last updated
Was this helpful?
Basics you need to know about GLFW contexts
Last updated
Was this helpful?
When working with OpenGL or OpenGL ES, a GLFW window object encapsulates an OpenGL or OpenGL ES context. This context object is created when a and is destroyed when a or GLFW is . More information about working with OpenGL and OpenGL ES context can be found .
Vulkan does not require such a context object. More information about working with Vulkan can be found .
There are a couple of that affect context objects, for example the version or profile of OpenGL to use.
An OpenGL (ES) context object can be shared between windows. This is useful when working with multithreading, as it makes the resources created in one context available to the context on a different thread. When , instead of using NULL
, the last parameter share
of glfwCreateWindow
should be a pointer to the window, which's context you want the new window's context to be shared with.
This means, to employ multithreading, a second window has to be created. This window can be made invisible by using the GLFW_VISIBLE
.