Object creation during game runtime.
Posted: Wed Oct 26, 2005 10:46 am
Hi everyone!
I have a question on Irrlicht scene management system.
I have downloaded the Newton-irrlicht tutorial and took a look at the source code. In the demo application you have some boxes falling down from the sky. During the application if you make a mouse click a box appears in front of you. I took a look at the box creation code and I have noticed this:
NewtonCube *CGame::MakeCube(vector3df loc)
{
NewtonCube *tmp = new NewtonCube;
tmp->mesh = smgr->getMesh("data/smallcube.3ds");
I am confused about the last line. The application loads the mesh from the hard disk each time a new object is being created? Does't this slow down the application?
I have a question on Irrlicht scene management system.
I have downloaded the Newton-irrlicht tutorial and took a look at the source code. In the demo application you have some boxes falling down from the sky. During the application if you make a mouse click a box appears in front of you. I took a look at the box creation code and I have noticed this:
NewtonCube *CGame::MakeCube(vector3df loc)
{
NewtonCube *tmp = new NewtonCube;
tmp->mesh = smgr->getMesh("data/smallcube.3ds");
I am confused about the last line. The application loads the mesh from the hard disk each time a new object is being created? Does't this slow down the application?