I just made this code, but I don't know if it is sufficient in getting the job done in OpenGL. Here is my LoadImage command for C++:
char *LoadImage( const char * filename )
{
int width, height;
FILE *file;
long fsize;
char *data;
file = fopen(filename, "rb");
if(file == NULL) { return 0; }
fsize = ftell(file);
data = (char*) malloc(fsize);
fread(data, 1, fsize, file);
fclose(file);
return data;
}
If that is in fact loading correctly, how do I texture it to a 2d box?
I googled all over the place and can't seem to be able to figure out how to get this to work.
The Lone Programmer
"Is The Juice Worth The Squeeze"
-The Girl Next Door