I have supposedly initialized GLFW at the begging of my Main call, but when I try to do an OpenGL call from a separate class that I have passed the GFLWwindow context to it gives me “the glfw library is not initialized” error on every draw loop, even though at the beginning of each function I check for !glfwInit()
Details:
Using GLFW 3.0.4
64-bit C++ Application
Only using fixed function OpenGL calls
“…Do not use constructors/destructors to initialize/destroy OpenGL objects. Instead, use member functions of these classes for these purposes. This violates RAII principles, so this is not the best course of action.
Have your OpenGL object constructors throw an exception if a context has not been created yet. This requires an addition to your context creation functionality that tells your code when a context has been created and is active.
Create a class that owns all other OpenGL related objects. This class should also be responsible for creating the context in its constructor…”