Code: Select all
scene::ITriangleSelector *TriSel = mpSmgr->createOctTreeTriangleSelector(LevelMesh->getMesh(0), LevelNode, 128);
LevelNode->setTriangleSelector(TriSel); //TriSel mem address = 0x01E2A078
irr::s32 NoTri = TriSel->getTriangleCount; //TriSel= 7753
Code: Select all
Function(scene::ITriangleSelector *TriSel); //the prototype for this function
irr::s32 NoTri = TriSel->getTriangleCount(); //after this method is called TriSel mem = 0x7ffdc000 and TriSel = -858993460
EDIT: Actually I really need the triangle selector to be the original, is this a known bug?? I really don't understand why its changing it in the function...
EDIT: Again, ok I've got around it but its still a bug IMO...