|BMP, JPG and TGA texture loader
||30 April 2002
||This is the unit that I use to load BMP, JPG and TGA files. No extra DLL's
Usage : Include the unit in your Uses clause.
- declare the texture in your main program (eg. MyTexture : glUint; )
- call the load function. LoadTexture('images/mytexture.jpg', myTexture,
and then you can bind the texture.
A texture can be loaded from a file or from the resource compiled with the
executable. The third parameter (LoadFromResource) determines where the file
should get loaded from. If LoadFromResource is TRUE, the function will try and
load the image the the resource file.
I have also got a "lite" version that loads BMP files only. The reason for that
is that EXE's created with this unit shouldnt be around 35KB.
JPG and TGA loader with sample application (54 KB)
|| BMP lite
with sample application (18 KB)
||BMP, JPG and TGA texture