StaticGeometry Tutorial


04-01-2007 18:40:52


I was using the staticGeometry class, I was searching in the forums and the wiki but I did´t find a good tutorial about using StaticGeometry.

Well, I create a example, I create 10000 robots and used the StaticGeometry Class for make the application faster but the performance is bad. I don´t know well how works the StaticGeometry but the 10000 robots does not create a single draw call.

I also changed the RegionDimensions from 1 to 5000000 and didn´t obtain the expected result.

The question is, how I use the StaticGeometry well, there is a tutorial?


Ernesto Gutierrez

Random r = new Random();
StaticGeometry sg = sceneMgr.CreateStaticGeometry("static");
for (int i = 0; i < 10000; i++)
Entity entt = sceneMgr.CreateEntity("robot" + i, "robot.mesh");
sg.AddEntity(entt, new Vector3((float)r.Next(-3000, 3000), (float)r.Next(-3000, 3000), (float)r.Next(-3000, 3000)));

sg.RegionDimensions = new Vector3(5000000f, 5000000f, 5000000f);


05-01-2007 12:49:25

You'd better direct this question to the main forums. Just don't mention Mogre to be sure that your topic won't get locked.
Include the sample code as well.


05-01-2007 17:25:15

Ok thanks.

Because my code is in C# I didn´t post the message there.

But I will write in the main forum.