PDA

View Full Version : bmp file in opengl



01-12-2001, 08:52 AM
hi everyone
how do i load a bmp file in opengl output window(VC++ IDE). i have to load diff. bmps in the same window in diff. viewports. i was suggested billboarding - what is it. is there no built in function?????
help!
thanks!
anxious

Elixer
01-12-2001, 08:58 AM
You just want to load a .bmp file and display it? I hope you mean using a .bmp as a texture right? Goto nehe.gamedev.com for some tutorials on this. There are many examples on this located everywhere.

Michael Steinberg
01-12-2001, 09:31 AM
I've got a 1bit / 4bit / 8bit / 16bit / 24bit and maybe 32 bit bmp file loader that saves it all in an rgb array.
Drop me a line if you want it.

Elixer
01-12-2001, 09:36 AM
Hmm, 32bit? I didn't think .bmp had 32bit formats, or at least the last time I looked, which is why I started using .tga files, since I need a alpha channel. http://www.opengl.org/discussion_boards/ubb/smile.gif

Michael Steinberg
01-12-2001, 09:42 AM
Well, Elixer, from practical standpoint, you're actually right. I don't know any software that would save bmp's with alpha channel. The 32 bit get interpreted completely for r,g and b values. I think that is written in the online help. Maybe I'm wrong. Because of that I also switched to tga files. However I still need a program that would combine a 24bit tga and a 8bit tga with alpha map in it. Well, at the end, it works... :=