I'm having trouble loading scenes saved with ISceneManager::saveScene() right now. However, I have no problems loading scenes generated with previous versions of irrlicht (pre 1.5).
I've modified both the irrlicht SVN and 1.5 (checked out from SVN) source so it prints out something everytime loadScene() reads something from the xml reader. The result is that nothing ever gets printed out.
This happens on 64-bit Gentoo Linux.
I'm using the following code to test this. At first, I create a scene with bunch of cubes and then save it to the file "geometry.irr". Then I comment out the cube generation/save code, and uncomment the loading 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( video::EDT_OPENGL, dimension2d<u32>(640, 480), 16,
false, false, false, 0);
if (!device)
return 1;
IVideoDriver* driver = device->getVideoDriver();
ISceneManager* smgr = device->getSceneManager();
/*for(int i=0;i<10;i++)
for(int j=0;j<10;j++)
smgr->addCubeSceneNode(10,0,-1,
vector3df(i*10,0,j*i*10));
smgr->saveScene("geometry.irr"));*/
smgr->loadScene("geometry.irr");
smgr->addCameraSceneNodeFPS();
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
driver->endScene();
}
device->drop();
return 0;
}