News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

gl/glaux.h Header

Started by reekingofrandomness, December 16, 2006, 12:51:07 PM

Previous topic - Next topic

reekingofrandomness

Where is it?!

I'm trying to teach myslef Open Gl and i've got stuck at texture mapping. The tutorial I'm use went through explaining this function but it doesnt compile, becuase it wants a type indetifier, or something like that. The turtorial does use the header file gl/glaux.h (which i cant find) but i don't know whether that function comes from there. If it doesnt could you suggest a possible alternative?!

AUX_RGBImageRec *LoadBMP(char *Filename) // Loads A Bitmap Image
{
FILE *File=NULL; // File Handle

if (!Filename) // Make Sure A Filename Was Given
{
return NULL; // If Not Return NULL
}

File=fopen(Filename,"r"); // Check To See If The File Exists

if (File) // Does The File Exist?
{
fclose(File); // Close The Handle
return auxDIBImageLoad(Filename); // Load The Bitmap And Return A Pointer
}

return NULL; // If Load Failed Return NULL
}



jpaterso

I think you can do one of two things:

1. You can write your own library to load bitmap files. They are *very* easy to deal with! A good place to start for information about files is http://www.wotsit.org .

2. Google it, and use somebody else's code. I found this: http://www.gamedev.net/community/forums/topic.asp?topic_id=275238 .

Personally, I think that if you really want to understand what's going on you should write your own. It will be instructive, and very easy!

Hope that helped,

Joseph.

reekingofrandomness

Thanks, i wrote my own and its all working well :D

jpaterso

No worries!

I actually just installed the Windows Platform SDK, and it comes with the GLAUX library... In case you need it in the future :)