PDA

View Full Version : Loading BMPs for Texture Mapping



ShadowGL
04-01-2001, 06:27 AM
Hello,

When I want to use 2D texture mapping, the "problem" arises that I have to load BMP files.
Although I read a source code which showed how to load and store BMP information into the appropriate structures, it was written in C-Style code. ( I use to load files via the iostream classes...)
Apart from that, I don't know anything about Windows BMP, thus I couldn't understand the source code.

Could anybody give me a simple example which demonstrates only the really necessary things about how to load a bitmap and attach it to the glTexImage function?

ZeeBoy
04-01-2001, 07:24 AM
I dont know what your programming capabilities are but to most beginers i would say go to the NeHe site.
http://nehe.gamedev.net

There are a range of tutorials on this site including loading and creating texture maps from BMP files.

hope that helps

Zee

Teofuzz
04-01-2001, 09:44 AM
If you don't want to load a bmp with glaux (like in NeHe's tutorials) I coded a c++ class that loads bmps. Mail me if you need it (email in profile).
Also you can have a look at www.wotsit.org (http://www.wotsit.org) (or .com??) to find specifications about every file format you need.
tFz