Since I started programming in OpenGL, I’ve been converting bitmap files into a format that’s compatible with OpenGL.
I was wondering what the OpenGL extension is that allows you to use Windows Bitmap files without converting them into another format. I would also appreciate any examples, since I’m not familiar with how extensions work.
I wouldn’t know of any extension which would do that (at least if you have 24-bits bmp, you can use GL_BGR_EXT). You can however use the DIB functions to get a compatible format.
I do paletted textures by hand…
Of course, by hand, means that the loading routine converts it!
glaux has a bitmap handling util
AUX_RGBImageRec *Image = NULL;
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, Image->sizeX, Image->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, Image->data);
works for me and remember to add the glaux.lib if your using vc++. I’m not sure if the glaux is windows specific, don’t think it is but not sure. Don’t know the limitation of auxDIBImageLoad either, it’s been working fine for me so far. Only been using 24bit images though.