"There are tho ways, a) use an existing library and b) write your own function, but you somehow have to get the image in the file into your memory, in the format you want it to have (for example RGB or RGBA).
I would recommend to either write a ppm/ascii-loader yourself (VERY easy) or use libjpg to load jpeg files (QUITE easy g)."
all right, so what is a ppm/ascii-loader and how do i write it. i also don’t know how to load jp[eg files using libjpg.
could someone recommend some code samples for all this.
Just to clear things up a bit for you, ppm is a file format, just like bmp, jpeg and so on, it’s pretty common in the unix world, and as said is very easy to handle, but there are not that many applications on windows that can read and write ppm files, even though I would gues that gimp on Windows might be able to help you.
The NeHe tutorials has a simple texture loader included if you want to take the easy way out…
Note: If your textures are not actual photos you should stay away from jpeg files (at least if you use compression) because the images will look like s**t.
Mikael
[This message has been edited by mikael_aronsson (edited 09-17-2003).]