Loading textures...

Started by
3 comments, last by Name_Unknown 18 years, 9 months ago
Okay, I imported my OBJ models and all I have to do is stick textures on them. So, how do I import a .bmp image into OpenGL? I heard something about storing textures in video card or whatever.......................
Advertisement
Take a look at nehe.gamedev.net, there's a couple of tutorials on there.
All you need is to get pixel data of the image. How you load the image is up to you. You may use some of the glu or aux library methods or write your own. It is fairly easy to write bmp loader. Once you have the pixel data you have to create texture from it i.e. using glTexImage2D or other.
Yes, I know how to do the texture mapping part with the texture coords and all... but just how am I going to load the thing?

If I decide to go with AUX, do I have to download the AUX library?

Thank you.
nah you mean glAux? It's in just about all OpenGLs, even windows.. but it kinda sucks. Better off use Devil or write your own loaders..

and maybe try TGA instead of BMP it's very easy to read, I can give you some code if you get stuck.
"It's such a useful tool for living in the city!"

This topic is closed to new replies.

Advertisement