Search code examples
openglglfw

Does terminating glfw and closing any open windows destroy any opengl contexts using said windows?


Does calling:

glfwTerminate();
glfwDestroyWindow(windowID);

terminate any glfw contexts which were using the now closed windows?


Solution

  • Yes:

    Window objects: The GLFWwindow object encapsulates both a window and a context. They are created with glfwCreateWindow and destroyed with glfwDestroyWindow, or glfwTerminate, if any remain.