OctTreesceneNode crash

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

OctTreesceneNode crash

Post by r3i »

I've tried to make this to create a scene :

Code: Select all

  IAnimatedMesh * geometriaScena = smgr->getMesh("./geometrie/aiuola.3ds");
   ISceneNode * Scena;
   if (geometriaScena) 
             Scena = smgr->addOctTreeSceneNode(geometriaScena->getMesh(0)); 
   else
       std::cout<<"NO";
       
   Scena->setPosition(vector3df(0,0,0));
When I run it crash at line 4 (if...)
area51
Posts: 338
Joined: Thu Mar 18, 2004 10:20 pm
Location: UK
Contact:

Post by area51 »

It's not found the 3ds file, change the path:

Code: Select all

IAnimatedMesh * geometriaScena = smgr->getMesh("geometrie/aiuola.3ds"); 

geometrie being a directory in your main project folder.

Also make sure the file is there, and it's extention is .3ds and not .3DS
________
Herbal vaporizers
Last edited by area51 on Tue Feb 22, 2011 1:05 pm, edited 1 time in total.
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

if it doesn't find the file then the IAnimatedMesh* should be set to 0 and it shouldnt crash. Thats my experience anyway. But, r3i, do you get any console output?
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
r3i
Posts: 147
Joined: Wed Jun 29, 2005 10:15 am
Location: Sorrento
Contact:

Post by r3i »

Hi Electron! Sorry fot the reply time.... my internet connection costs!

I've tried without "./" and it works (thanks!!!!!)
Now I'm using your tip with getmesh(0) : it's allright!

I haven't any output in console except one:

Could not draw triangles, too many primitives 89999 ( maximum is 65539 )

How can I solve this problem?? Splitting the scene??
This is my level...a garden....how can I ?

Thank for all very much
Post Reply