TGA Image loader
Version 3.0
Includes precompiled DLL, and source.

--

Features loading of (both RLE compressed or uncompressed):

Grayscale (alpha) and Indexed 8Bit
16Bit
24Bit
32Bit

From Grayscale or RGB[A] (in the case of RGB[A], it uses the Blue channel)
images, this library can convert images (before upload) to the following special images:
DUDV or DSDT (ATI and nVidia Only)
DOT3 Normal Map

Also allows for loading of 6 textures for cubic enviroment mapping.

--

Update: 2-20-2003 2:32PM CST
Did a little remodeling.  Redid the main TGA struct, so that's a little cleaner now.
Added RLE compressed 16Bit support.

Still need to do cleaning of the TGA_GetData function, but that's a job for another day.

Update: 2-17-2002 7:25PM CST
Added 16bit image support.

Update: 12-7-2001 12:44PM CST
Added RLE compressed support of indexed images.
Added a Usage.txt file for usage info of this library.
Did some reformatting of this text file.

Update: 12-7-2001 3:51AM CST
Added Indexed 8bit image support, no RLE indexed support *YET*, but I'm working on it.

Update: 11-30-2001 3:12PM CST
Added 8bit RLE support (it should work, I haven't tested it, as I can't find an image editor that can save 8bit RLE compressed grayscale images).
Fixed a problem with Windows 2000 unpon TGA_GetData fails (like if the file wasn't found), it would cause a program crash.
All mipmap levels are now created using GL_SGIS_generate_mipmap if it's avail (otherwise it uses gluBuild2DMipmap).
Some minor bug fixes.

I'm working on adding indexed 8bit images (not sure if it's worth it though, anyone?  Email me if you would want this support.)

Update: 9-5-2001 1:07AM CDT
Removed the custom mipmap stuff for the DOT3 uploader, so it uses gluBuild2DMipmap now, because for some stupid reason my GeForce2 didn't like the custom one.

Update: 9-4-2001 1:26AM CDT
Changed the DuDv uploader so it supports nVidia's DsDt map, so now this uploader can be used on either the ATI Radeon (and up), and the GeForce3.
Removed mipmapping from the DuDv uploader because it makes the bumps look too weird, and nVidia's DsDt format doesn't support mipmapping.

Update: 8-26-2001 2:54AM CDT
Changed the Scale function so it supports multiple channels, and it's now a Box Filter resize (I acually took it from the Hawk Engine made by Phil Frisbie Jr).
Updated both the DuDv and DOT3 map converters.
Changed both of the DuDv and DOT3 image uploaders to that they do mipmapping correctly (DOT3 mipmapping based on something that nVidia said, but I think it looks a little funny).
Added some small comments, so that you know what the functions do.

TODO:
In the next update I may change the uploaders so that they are more flexiable (so you can specsify the min/mag filters, mipmapping, texture address mode).
I still need to add the DsDt (nVidia OpenGL EMBM Texture), so that the DuDv isn't ATI only (can someone help with that?).

Update: 8-14-2001 12:13AM CDT
Updated the DuDv loader again, fixed a few things (like a few pointers were unsigned char, when they should have been char).
I also changed the image resizer for the DuDv loader so it does a bilinear resize.
Added support for GL_SGIS_generate_mipmap (if the loader detects the extension, it uses it).
Added checking for GL_EXT_texture_edge_clamp (if it doesn't find that extension, it just uses GL_CLAMP).
Removed the need for the glati.h file.

Update: 7-22-2001 12:57PM CDT
I updated the DuDv loader, so it generates mipmaps, the image resize function isn't very good (point sampled), but it'll do.
The only problem with the DuDv loader is that it doesn't detect non power of two images, so you'll have to becareful about that.

Update: 7-8-2001 5:09PM CDT
Oops!  I forgot to change the RLE decoder back so that it does BGR(A) not RGB(A), it's fixed now (it was RGB(A) for debugging).

Update: 7-6-2001 11:26AM CDT
I've added support for RLE compressed 24 and 32 bit images, I didn't add support for RLE compressed 8bit images, because I feel that it isn't needed.
I did some code clean up as well.

Update: 7-5-2001 2:00PM CDT
Updated the DUDV and DOT3 uploaders, you now can use RGB and Grayscale images as bump texture (assumes the red channel as the heightmap).

Update: 6-18-2001 12:48PM CDT
Made more revisions to the image uploaders, it now frees the image data array if the image isn't found.
DuDv image uploader now converts on-the-fly, so all you need is a grey scale image for the bump texture.
Added DOT3 image uploader, which also converts on-the-fly, and only needs a greyscale image for the normal map.
I've also descided that the extension GL_EXT_texture_edge_clamp is a standard enough of an extension to use in my Cube Map uploader, so I'm using that per ATI's sugestion.
Changed the mag filter to GL_LINEAR, and the min filter to GL_LINEAR_MIPMAP_NEAREST on TGA_UploadImage.

Update: 4-27-2001 10:33AM CDT
Made revisions to the image uploaders.
Added DuDv image uploader (for extension GL_ATIX_envmap_bumpmap, will be revised later).

Update: 3-27-2001 2:00AM CST
Changed to BGR/BGRA OpenGL 1.1 extension for easier loading of TGA images (TGA images are BGR not RGB).
