.3ds and .obj file

How do I import a 3ds file into opengl ?
I know I have to use a 3ds loader,but I have no
idea about how to do it.
Is .obj file aslo a kind of 3D graphic file?
Could I just use .obj file in opengl with some opengl function?

Anyway,I just wanna know how to construct a 3D
object in opengl.(or download it form net) I know I could use polygons to construct,but I don’t think it’s an easy way.

Thanks for any help and suggestion!!

I use a 3DS loader that I found on the net. Basically the loader opens the .3ds file, reads the contents, and stores it in memory. Then I call the drawing function included in the loader to render to the screen.

The render function just uses normal gl functions, like glColor3f() and glVertex3f().

I don’t think you’ll find anything related to loading models included in OpenGL itself.

http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg4.htm

Why you not use Export file form ASE or VRML to controller model.

When I use the 3ds file loader (downloaded from
http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg4.htm )
to import some 3ds file,it shows the following
window message:
Failed to open DIB file CARPET2.TGA.

What does that mean? Can anyone help? Thanks!!

shot in the dark: it can’t find the file?

hm, it can’t load a .tga file, not a .3ds file, are you sure the file you want to load is in 3ds format ?

TGA’s format usually used with textures, maybe a problem to load the texture of your 3D object