SFCBias
28-05-2010 01:41:24
After i extract the tree positions from the Ogitor produced .instance file, i use this method to load the trees, but they do not appear
However if i create each tree as a separate entity (Without using PG), they come out fine. Im just worried that if i do it that way there will be significant performance loss with a render of thousands of trees
SceneManager* mgr = SceneHandler::getSingleton().getSceneManager("Octree1");
String name = "Tree" + StringConverter::toString(mTreeInstanceIndex++);
Entity *myEntity = mgr->createEntity(name, "tree.07.mesh", "Custom");
treeLoader->addTree(myEntity, info.pos, Degree(info.yaw), info.scale);
LogManager::getSingleton().logMessage("[PGInstanceLoader] Created Tree '"
+ name + "'");
However if i create each tree as a separate entity (Without using PG), they come out fine. Im just worried that if i do it that way there will be significant performance loss with a render of thousands of trees