smernesto
04-01-2007 18:40:52
HI.
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?
Thanks
Ernesto Gutierrez
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?
Thanks
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);
sg.Build();
sg.SetVisible(true);