I'm new to both C++ and OpenGL. (Kind of dumb to try and learn them both at the same time, but meh, it keeps me interested.) Anyway I should ask about this, since I'm probably misunderstanding something fundamental, what actually happens when you call an OpenGL method from another class?
I'm trying to make a simple game structure. I've made a class I've just called 'World'. I construct a world object and pass it the information it needs to load a level. They I call various methods which get it to load in what it needs, which eventually will be textures and models and whatnot. For the moment all it does is build a single display list which is stored as a member field. My draw method back in the main code then calls glCallList on the field in my World object .
The problem is that the display list isn't drawn. When I copy the list building method back into my main file it works fine. I'm not sure what's going on here.