PDA

View Full Version : obj, mtl, bmp, pcx and opengl



jermster
12-30-2000, 09:58 PM
I'm a new to opengl, started programming in it for about 3 months now. And I just figured out how to display .obj files in opengl by using the glm.c files that I found at
http://romka.demonews.com/opengl/utils/index_eng.htmyour site.

I downloaded a model (.md2) from other sites and converted it to .obj files with a 3D program (3D Exploration). But the thing is it also comes with a skin/texture (bmp, pcx, etc.)

My question is how do you get the skin onto the model in opengl?

Or is a better way to work with pre-made 3D models?

(I been trying to mess around with .mtl files but I don't know how to use them.)

Thank you and any response is greatly appreciated.

---J.R.
jerm97@hotmail.com

XBCT
12-31-2000, 04:25 AM
You need to do your texturing yourself with OpenGl function calls....Read some tutes on texturing with OpenGl and youŽll get what you want....If you need some links, tell me....

HTH, XBTC!

Elixer
01-01-2001, 12:08 PM
The .mtl files contain the texture files for each object (or triangle or whatever).
You just need to read this file, find the texture name, load it using openGL calls, bind it, then the rest is easy. http://www.opengl.org/discussion_boards/ubb/smile.gif

XBCT
01-02-2001, 05:09 AM
Hi!
This may be a good link for you: http://nehe.gamedev.net/tutorials/lesson06.asp
Greets, XBTC!