Dear GLFW community,
I am working on a small project using GLFW. I wanted to simplify the rendering process for myself, and be able to construct a “rendering object” in a seperate c++ class, which is then called by the main render function. Quite simply, I construct an instance of this class, where I pass in vertex and indices data. Using this, I call a method on the object updateData(), which makes all relevant gl commands to render. Finally, I call render() on the object in the main rendering loop, which just contains the code needed in the rendering loop.
If I unfold all this class stuff and simply put it in my main render.cpp, it works. When wrapped in a class abstraction, the same exact commands cease to work. It seems that the actual underlying data is still there in the rendering loop, so it does not seem to be a pointer / data issue.
Hope my description of the problem is somewhat clear… What could be going wrong here?