I'm starting with OPENGL but I got experience with c++. I understand well how coding objects in OPENGL but I'm confused on how to design my OPENGL program. Basically, I would like to create an animation as a movie, with no input interaction (keyboard, mouse) from the viewer, but only scenes drawn as a function of the time elapsed.
I'm using GLUT and what confuse me is that in all examples I saw, there is always only one scene to draw which is called by the function glutDisplayFunc. You can make rotation or translation operations on this scene but you can't switch between different scenes. For example, let say an animation which consist of a person (or a camera) entering into a home and moving from one room to another. It doesn't seem optimal to have a unique function called by glutDisplayFunc to describe the whole home, (the kitchen, bedrooms ...) because it will take huge resources to render the scene. It seems to me more logical to create multiple scenes to describe each room of the home and then call the appropriate scene when the person (camera) is entering to a specific room. How can I decide to render the scene “kitchen” with glutDisplayFunc at the time t for example?
A simpler example could be like this: let say I’ve a scene which is static for a period of time and then, at time t, I decide to make appear an object. How should I design my code for doing this?
Thank you very much for your help