Problem using .irr Scenes

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Problem using .irr Scenes

Post by sudi »

Ok somehow the SceneLoading isn't working on my system...
When i use the following code i prints out in the console window that it loaded all the meshes and textures correctly but nothing is drawn on the screen and the fps camera doesn't work either(means the mouse doesn't stay in the middle of the screen)
can anyone help me?

edit: Only scenes made with irrEdit 0.4 don'T work the shipped exampel does work

Code: Select all

int main(int argc, char *argv[])
{

    IrrlichtDevice *device = createDevice(EDT_OPENGL, dimension2d<s32>(640,480), 32, false, true, false, NULL);

    video::IVideoDriver* driver = device->getVideoDriver();
    scene::ISceneManager* smgr = device->getSceneManager();
    gui::IGUIEnvironment* gui = device->getGUIEnvironment();

    device->setWindowCaption(L"ShootIrr");

    smgr->loadScene("data/levels/mytest.irr", 0);
    smgr->addCameraSceneNodeFPS();

    // draw everything
    while(device->run() && driver)
    {
           driver->beginScene(true, true, video::SColor(255,0,0,255));
           smgr->drawAll();
           gui->drawAll();
           driver->endScene();
    }

    // delete device
    device->drop();

    system("PAUSE");
    return EXIT_SUCCESS;
}
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
andrei25ni
Posts: 326
Joined: Wed Dec 14, 2005 10:08 pm

Post by andrei25ni »

I had that problem too. It because of the new irr file.
Open the file with a text editor and replace the attributes tree with :

Code: Select all

	<attributes>
		<string name="Name" value="root" />
		<int name="Id" value="-1" />
		<vector3d name="Position" value="0.000000, 0.000000, 0.000000" />
		<vector3d name="Rotation" value="0.000000, 0.000000, 0.000000" />
		<vector3d name="Scale" value="1.000000, 1.000000, 1.000000" />
		<bool name="Visible" value="true" />
		<bool name="AutomaticCulling" value="true" />
		<bool name="DebugDataVisible" value="false" />
		<bool name="IsDebugObject" value="false" />
		<colorf name="AmbientLight" value="0.000000, 0.000000, 0.000000,
0.000000" />
	</attributes>
Hope it works :wink:
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Post by sudi »

Jepp it works perfectly....but why is it like that?????
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
andrei25ni
Posts: 326
Joined: Wed Dec 14, 2005 10:08 pm

Post by andrei25ni »

Guess that Niko forget to generate that piece of code in the new version. :roll:
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Ah, sorry, too bad. :) I changed the loading part a bit, it works with the version in the SVN. I'm going to change the saving of .irr files a bit again in irrEdit 0.5 to make it work with irrlicht 1.1 again.
Post Reply