Hi, I'm still new to graphics programming, but I want to have ago at loading and unloading levels/scenes. I have no idea where to start is there any resources that could be helpful that anyone knows off? Or any tips or advice to send me down the right path?
Scene loading and unloading in DirectX
Create a scene class that contains lists for your meshes, lights, etc… and also other information such as the scene name, skybox texture, fog configuration and whatever else you might have in your engine. In your main renderer class make a ‘currentScene’ variable that stores a reference to the current scene that is meant to be running. Then in your update and rendering loops you can simply update/render objects from scene that is stored in the ‘currentScene’ variable. For saving and loading look into serialization which allows you to write the state of an object(s) to a file and retrieve it later. Alternatively, you may also want to use your own format for storing scene data in a file.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement