Is close window clearing all data on GPU?

I am unable to find wheather GLFW.DestroyWindow() command will effectively clear all data on GPU - so for example texture data, data in buffers … ?

In general destroying the last OpenGL context in a share group will destroy all shareable OpenGL objects (e.g. textures, buffers) as well as all non-shareable objects belonging to that context. For the common case of just a single OpenGL context, that means destroying the context destroys those objects.
In GLFW the OpenGL context is associated with the GLFWwindow, so (assuming you only have one window) destroying the window also destroys the OpenGL context and therefore all the OpenGL objects. For more complex scenarios with multiple windows or contexts, see GLFW: Context guide .

1 Like