Loading meshes other than the ones in Hello World example

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.
Ean
Posts: 22
Joined: Tue Oct 16, 2007 11:52 pm

Loading meshes other than the ones in Hello World example

Post by Ean »

Hello. I have decided I wish to try Irrilicht. I have downloaded 1.4.1 and am using Dev C++ to compile. But no matter what I put for the mesh, it keeps loading the same sydney mesh! When I click "Clear" or "Rebuild All" (options in the Dev C++) I get unexpected error and game crash! :cry:
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Post by floppyfreak »

if you have a freshly compiled program and changed the mesh to load you definitly shouldn't see the old lady :) .
The compile was error free?
Ean
Posts: 22
Joined: Tue Oct 16, 2007 11:52 pm

Post by Ean »

floppyfreak wrote:if you have a freshly compiled program and changed the mesh to load you definitly shouldn't see the old lady :) .
The compile was error free?
Yes.
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Post by floppyfreak »

sigh. :)
let us see your code
Ean
Posts: 22
Joined: Tue Oct 16, 2007 11:52 pm

Post by Ean »

floppyfreak wrote:sigh. :)
let us see your code
It is exactly the same as the Hello World example but sydney.md2 is replaced with mymesh.ms3d, "mymesh" is in the same directory as sydney
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Re: Loading meshes other than the ones in Hello World exampl

Post by floppyfreak »

Ean wrote:Hello. I have decided I wish to try Irrilicht. I have downloaded 1.4.1 and am using Dev C++ to compile. But no matter what I put for the mesh, it keeps loading the same sydney mesh! When I click "Clear" or "Rebuild All" (options in the Dev C++) I get unexpected error and game crash! :cry:
Sorry, I see a contradiction here. How can you say you have a correctly compiled program with this kind of problems?
What errors? Your program mustn't crash if you wanna see mymesh.dings :)
Ean
Posts: 22
Joined: Tue Oct 16, 2007 11:52 pm

Post by Ean »

There are no problems with the compiler when this happens. The Irrlicht displays the error message. Besides, this does not occur unless Rebuild All or Clear is initiated.
d3jake
Posts: 198
Joined: Sat Mar 22, 2008 7:49 pm
Location: United States of America

Post by d3jake »

To try and track down the source line(s) of the issue, you can #include <iostream> and then before and after each chunk of code from the example, you can place a

Code: Select all

cerr << "I am before this line, that does x" << endl;
And continue that through your program. Compile and run your program, it should crash as usual, but it should also spit out a text file. You can open that text file and see about where in your code it stops, because after that point you shouldn't be able to read your

Code: Select all

cerr << "Comments about the lines of code they are near" << endl;
The Open Descent Foundation is always looking for programmers! http://www.odf-online.org
"I'll find out if what I deleted was vital here shortly..." -d3jake
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Post by floppyfreak »

most likely this is a problem with your mesh. Try antother one, try other formats... Once you will see where the problem with this one was. You can also try basic functions like addSphereSceneNode. for testing purposes these are good.
Ean
Posts: 22
Joined: Tue Oct 16, 2007 11:52 pm

Post by Ean »

floppyfreak wrote:most likely this is a problem with your mesh. Try antother one, try other formats... Once you will see where the problem with this one was. You can also try basic functions like addSphereSceneNode. for testing purposes these are good.
No no no-it also malfunctions the same exact way with the Sydney mesh! And
Irrlicht gives the error NOT Dev C++!
I even deleted all of the mesh loading code and it still renders the mesh! It is like it does not clear it from memory even after a call to "drop" and "endscene" AND exiting Dev C++ AND the program!

I also noticed Dev C++ automatically saves any changes when I exit, WITHOUT asking my permission!

What are the parameters for addSphereSceneNode?
floppyfreak
Posts: 117
Joined: Sat Apr 19, 2008 10:14 am

Post by floppyfreak »

Ean wrote: No no no-it also malfunctions the same exact way with the Sydney mesh! And
Irrlicht gives the error NOT Dev C++!
I guess so. thats why I say, it might be a problem with your mesh, not with the code.
I even deleted all of the mesh loading code and it still renders the mesh! It is like it does not clear it from memory even after a call to "drop" and "endscene" AND exiting Dev C++ AND the program! I also noticed Dev C++ automatically saves any changes when I exit, WITHOUT asking my permission!
now how can this be. Your code has no line that loads the mesh, but the mesh is loaded? than its really to freak out 8) . Are you sure you compile the lines that you edit? Read the dev-c++ basics.



What are the parameters for addSphereSceneNode?
you find it in the docu:
http://irrlicht.sourceforge.net/docu/cl ... r.html#a22
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

Ean wrote:There are no problems with the compiler when this happens. The Irrlicht displays the error message. Besides, this does not occur unless Rebuild All or Clear is initiated.
What error message?

If you simply build your (modified) code, you still see sydney.md2? If so, then you're not running the modified exe. Really, you're not. That's most likely an issue either with Dev-C++, or with your understanding of it.

Either way, these are your issues, so you can either continue shouting! at us, or you can start problem solving step by step.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Ean
Posts: 22
Joined: Tue Oct 16, 2007 11:52 pm

Post by Ean »

I click compile and run. And it renders the sydney mesh no matter what.

To make sure the Dev C++ is completely refreshed I click Clear or Rebuild All. But after that Irrilicht gives me Unexpected Error and crash! :(
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Use the DevC++ debugger to work out where it's crashing.

Click the debug tab at the bottom of the screen and then the debug button that pops up.

Also does the console output tell you anything at the point of the crash? Alt-tab to the console window when the crash happens and see if it says anything unexpected.
Image Image Image
Ean
Posts: 22
Joined: Tue Oct 16, 2007 11:52 pm

Post by Ean »

JP wrote:Use the DevC++ debugger to work out where it's crashing.

Click the debug tab at the bottom of the screen and then the debug button that pops up.

Also does the console output tell you anything at the point of the crash? Alt-tab to the console window when the crash happens and see if it says anything unexpected.
ive just researched and rebuild and clear isnt what I need, but compile and run should update the mesh but it wont.
Post Reply