PDA

View Full Version : *.obj loader



10-02-2000, 11:58 PM
i have one file called object.obj.
this file contains textures mapped on it. along with object.obj is object.mtl, where all the info of textures and coordinates included in it.

i have called glm.c where in this file has functions that will load .obj file.

my problem is, this loader didn't load the textures as well, as it is supposed to. (or am I wrong for this definition)

please explain...

would be much appreciated if anyone could give me a sample code to load .obj files.
TQ

AndersO
10-03-2000, 03:00 AM
Go to www.wotsit.org (http://www.wotsit.org) search for obj, there is a obj spec there. Read it and write some code. http://www.opengl.org/discussion_boards/ubb/smile.gif

chaz
10-04-2000, 10:44 PM
Load your bmp or whatever it is make it a texture glBind your texture right before you draw with (GLM_SMOOTH | GLM_TEXTURE) that is if your talking about the glm.h,glm.c from Romka's site I think that is spelled right.It loads texture coords not the texture.Might have to add GLM_MATERIALS when you draw to.