Hi,
Just wondering, when I run my d3d engine main program, I have 1 instance of the class d3dscene.
When I go to another scene, I call the destructor and load the new one.
This keeps my main loop clean, always rendering the same d3dscene object.
My question;
- what would be 'better', create a regular 'object' on the stack, i.e. "engine::d3dscene myscene", when finished manually call the destructor + constructor and then call it's member function 'loadscene'?
versus
- engine::d3dscene *myscene = new engine::d3dscene;
and when finished, delete myscene and again "*myscene = new engine::d3dscene
In the 1st option calling the constructor is necessary to reset all counters, vars etc., and it's working fine.
What would you say?