hi there
is there any easy way to load bitmaps without using glaux(cuz its not working and i dunno why)?
thanx
jono
Off the top of my head…
FILE *f;
struct stat s;
void *m;stat(filename, &s);
m = malloc(s.st_size);
f = fopen(filename, “r”);
fread(m, s.st_size, 1, f);
works with any sort of file too, not just bitmaps.
Search for .BMP file format on
www.wotsit.org
It will be an easy task to code a function that loads the bitmap into memory.