Problem loading meshes in Linux

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
jovian
Posts: 5
Joined: Thu Sep 25, 2003 4:44 pm
Location: Maplewood, MN
Contact:

Problem loading meshes in Linux

Post by jovian »

I just started with the engine but looks great thus far! Anyway I did tutorial 1 and it works fine. But when I change the model from sydney to one that I make or download the engine always says its an unsupported format. The main files Im using are obj files that are converted from blender but have also used .3ds files I got free from 3dcafe and it gives the same error. So my question is .. Is this a bug or am I doing anything wrong for these other formats (note nothings changed except changing the file name for the model, commenting out the 3 lines of code below it, and adding the new model file to the media folder) any comments or advice is welcome and thanks in advance. BTW im using Mandrake 9.1
Cheers,
Jovian
jovian
Posts: 5
Joined: Thu Sep 25, 2003 4:44 pm
Location: Maplewood, MN
Contact:

Post by jovian »

alright I found a diferent exort script and that works. But it still mystifies me why some 3ds files I downloaded will not load stating the error unsupported format. Can anyone offer some insight to this
Cheers,
Jovian
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Hi, maybe the .3ds loader is not 100% working yet.. Could you send me these models which didn't work to irrlicht@users.sourceforge.net?
jovian
Posts: 5
Joined: Thu Sep 25, 2003 4:44 pm
Location: Maplewood, MN
Contact:

Post by jovian »

Okay I'm sending them now should be there in a few minutes. Also is the .obj loader okay because boxes come in fine but a more complex model is distorted. I will send both .3ds which doesn't work and a distorted .obj file
Cheers,
Jovian
jovian
Posts: 5
Joined: Thu Sep 25, 2003 4:44 pm
Location: Maplewood, MN
Contact:

Post by jovian »

I was curious as to if you had any problems loading the meshes or in general how it was going?
Cheers,
Jovian
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

I havent found the problem with the .obj file yet, but the .3ds file problem is solved. It will be fixed in the next version. If you want to fix it yourself in your version, just comment these lines out:

Code: Select all

if (version != 0x03)
{
 os::Warning::print("Cannot read 3ds meshes of versions other than 3.");
 return false;
}
in the readChunk() method in the file C3DSMeshFileLoader.cpp.
jovian
Posts: 5
Joined: Thu Sep 25, 2003 4:44 pm
Location: Maplewood, MN
Contact:

Post by jovian »

ok thanks niko. while compiling I also recieved this error.
g++ -c CVideoOpenGL.cpp -o CVideoOpenGL.o -I"include/" -DIRRLICHT_EXPORTS=1
CVideoOpenGL.cpp: In member function `virtual void irr::video::CVideoOpenGL::drawIndexedTriangleList(const irr::video::S3DVertex*, int, const u16*, int)':
CVideoOpenGL.cpp:311: `glClientActiveTextureARB' undeclared (first use this function)
CVideoOpenGL.cpp:311: (Each undeclared identifier is reported only once for each function it appears in.)
CVideoOpenGL.cpp: In member function `void irr::video::CVideoOpenGL::setTexture(int, irr::video::ITexture*)':
CVideoOpenGL.cpp:626: `glActiveTextureARB' undeclared (first use this function)
make: *** [CVideoOpenGL.o] Error 1

which was easily fixed by copying these lines from the windows define to the linux define right below in CVideoOpenGL.h

PFNGLACTIVETEXTUREARBPROC glActiveTextureARB;
PFNGLCLIENTACTIVETEXTUREARBPROC glClientActiveTextureARB;
as for the obj file issue I'm working on that here as well by trying different things with the converter. It might just be easier if I look into making a loader directly for blender. Where would be the best place to start looking into this?
Cheers,
Jovian
Post Reply