12-27-2005, 08:45 PM
Hey Guys,
I have been trying to load a 24 bit .bmp into the frame buffer, and a 24 bit image does not contain alpha values, but I want the colour (say white) not to be drawn so that i can have transparency. I can not figure out how to do this without reordering me BGR data to RGB and then adding an ALPHP value at the end and then using gjDrawPixel in format GL_RGBA. This solution seems to be suboptimal. I tried glDrawPixel with GL_BGR_EXT and GL_ALPHA to draw the parts sepratley(after generating my own alpha values based on the image). Ontop of that I tried using glColorMask, to no avail, and glBlendFunc, but I could just not get it to work(yes I used glEnable(GL_BLEND)).
I would really appriciate any ideas on how to properley use glDrawPixels, glColorMask, glBlendFunc, and/or other functions to make this work.
Thanks,
Gubber
I have been trying to load a 24 bit .bmp into the frame buffer, and a 24 bit image does not contain alpha values, but I want the colour (say white) not to be drawn so that i can have transparency. I can not figure out how to do this without reordering me BGR data to RGB and then adding an ALPHP value at the end and then using gjDrawPixel in format GL_RGBA. This solution seems to be suboptimal. I tried glDrawPixel with GL_BGR_EXT and GL_ALPHA to draw the parts sepratley(after generating my own alpha values based on the image). Ontop of that I tried using glColorMask, to no avail, and glBlendFunc, but I could just not get it to work(yes I used glEnable(GL_BLEND)).
I would really appriciate any ideas on how to properley use glDrawPixels, glColorMask, glBlendFunc, and/or other functions to make this work.
Thanks,
Gubber