I've recently discovered an error that seems to have cropped up in my project since upgrading from 1.3.1 to 1.4
Basically, whenever I load an .X model into Irrlicht, and then animate it (using basic Irrlicht animators, like rotate, etc) it seems to 'flicker' every second or so. By this I mean the model renders and animates perfectly, except that every second it disappears, only to reappear just as quickly.
I'm currently using directx 9 as the renderer, although the problem occurs in dx8 and opengl as well. Oh, and it's the standard 1.4 distribution, not SVN, if that makes a difference.
The code I use is as follows:
Code: Select all
IAnimatedMesh* tempmesh;
IAnimatedMeshSceneNode* tempanimmesh;
tempmesh = m_pGMgr->smgr->getMesh("Data/Models/temp.x");
tempanimmesh = m_pGMgr->smgr->addAnimatedMeshSceneNode(tempmesh);
m_pFleets.push_back(tempanimmesh);
m_pFleets[i]->setPosition(core::vector3df(lgamedata.m_pStarmap.vFleets[i].x,0,lgamedata.m_pStarmap.vFleets[i].y));
m_pFleets[i]->setMaterialFlag(video::EMF_LIGHTING, false);
m_pFleets[i]->setAutomaticCulling(scene::EAC_FRUSTUM_BOX);
I've tried disabling the lighting, changing materials, etc, but nothing seems to fix the weird flickering. Would anyone have any idea why this might be happening?
Any help would be really appreciated!