User forums > Using Code::Blocks
gl/glaux.h Header
(1/1)
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?!
--- Code: ---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
}
--- End code ---
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 :)
Navigation
[0] Message Index
Go to full version