after some trial and error it seems that the some nodes i add (such as the 'decals' which are just .3ds meshs scaled to have 0 y-dimension) appear to flicker randomly based on which order i have my lines of code and weather or not i run the game from inside msvc++ or standalone! for example the following lines produce no flicker when i run the game in debug mode from msvc++, but if i run the file directly from the folder then the flicker is there!
Code: Select all
irr::scene::IAnimatedMesh* mesh = smgr->getMesh("boards.3DS");
if (mesh) node = smgr->addAnimatedMeshSceneNode(mesh);
if (node) {
node->setMaterialFlag(irr::video::EMF_LIGHTING, false);
node->setMaterialTexture( 0, driver->getTexture("ice.bmp") );
node->setScale(irr::core::vector3df(10,0,10));
node->setPosition(pos);
}
irr::scene::IAnimatedMeshSceneNode *hog = smgr->addAnimatedMeshSceneNode(mesh);
if (hog) {
hog->setMaterialFlag(irr::video::EMF_LIGHTING, false);
hog->setMaterialTexture( 0, driver->getTexture("hog.bmp") );
hog->setPosition(irr::core::vector3df(-300.0f,-2,0));
hog->setScale(irr::core::vector3df(40,1,10));
hog->setPosition(pos2);
}
however if i revsere the oder in which those nodes are created (from the same mesh) then the flicker is present when i run in debug mode from msvc++ but *not* present when i run the exe itself from outside of msvc++ !
has anyone else experience this problem of seemingly random nodes appearing to flicker when the FPS camera is moved away from them? i can't see why changing the order of creating the nodes should have any effect on the scene (or for that matter why the scene looks one way when run from within msvc++ and a different way when run byt itself)
should i create a debug or release build of irrlicht.dll?
http://www.teamtomko.com/game_debug_msvc.jpg <--- this is a srcreenshot when i run the game from msvc++
http://www.teamtomko.com/game_debug_msvc_flicker.jpg <--- this is a srcreenshot when i run the game from msvc++ and i simply reverse the order adding those nodes .. that's it! and the flicker somehow happens
is there a correct order to creating many nodes using the same mesh?