How to use this Library:

First of all, you need to include and link to the library:

#include "tga.h"

And add the library to your project's library link.

And then somewhere in your application (where ever you upload the image, probably in you OpenGL init function) use one of the following:

--

TextureID=TGA_UploadImage("file.tga");

Where TextureID is the returned texture object for the texture (so you can bind the texture to an object).

--

TextureID=TGA_UploadDOT3("file.tga");

This will pass a Grayscale or 24bit image through a special filter to create what is called a Normal Map, and is used for PerPixel bump mapping.

--

TextureID=TGA_UploadDUDV("file.tga");

This will also pass a Grayscale or 24bit image through a special filter to create what is called a DUDV Map,
and this map is used for what's called EMBM, or Enviroment Mapped Bump Mapping (only works on cards that support GL_ATI_envmap_bumpmap and GL_NV_texture_shader).

--

TextureID=TGA_UploadCube("right.tga", "left.tga", "top.tga", "bottom.tga", "front.tga", "back.tga");

This will upload six (6) textures as Right, Left, Top, Bottom, Front, and Back sides of what's called a Cube Map,
and is generally used for doing what's called Cubic Enviroment Mapping (Uses GL_ARB_texture_cube_map).

--