it seems there is a bug with the octtree scene node...
when I look at the scene node, then some shapes are disapearing, depending on the angle I'm looking at it:
I used this mesh: map.zip (tried as .x, .3ds and .ms3d)
and this very simple code:
Code: Select all
#include <irrlicht.h>
using namespace irr;
using namespace core;
using namespace scene;
using namespace video;
using namespace io;
using namespace gui;
int main(){
IrrlichtDevice *device = createDevice(EDT_DIRECT3D9, dimension2d<s32>(640, 480), 16, false, false, false, 0);
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
IAnimatedMesh* mesh = smgr->getMesh("map.x");
ISceneNode* node = smgr->addOctTreeSceneNode(mesh->getMesh(0));
node->setMaterialFlag(EMF_LIGHTING, false);
node->setScale(vector3df(10,5,10));
smgr->addCameraSceneNodeFPS();
device->getCursorControl()->setVisible(false);
while(device->run()){
driver->beginScene(true, true, video::SColor(0,0,0,0));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}