Code: Select all
for (int y = 0; y < 50; y++)
{
for (int x = 0; x < 50; x++)
{
scene::ISceneNode* DotSceneNode = smgr->addSphereSceneNode(.5, 8, NULL, IDFILTER,
core::vector3df(6*x,6*y,0));
DotSceneNode->getMaterial(0).AmbientColor.set(128, 0, 0, 255);
}
}
Does anyone have an idea of why is so slow? What am I doing wrong to get this slow speed? What can I do to improve it?
I cannot join all the geometry in one only object, as later I need to select each sphere individually...
Thanks in advance!
Hugo