That function well. Now, I would like to “not draw” (transparent) one color from my bitmap (Ex: I no want the draw function draw the 0xFF, 0xF0, 0XF0 color).
Please, I hope someone can help me because I’m a dummy on OGL
That function well. Now, I would like to “not draw” (transparent) one color from my bitmap (Ex: I no want the draw function draw the 0xFF, 0xF0, 0XF0 color).
Please, I hope someone can help me because I’m a dummy on OGL
Alternatively, make the image 32-bits deep and use the GL_RGBA format. Then you can specify the transparency in the alpha channel. Set it to 0 for transparent pixels and 255 for opaque ones.
Set glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA), enable blending and draw the image.
Don’t forget to disable blending afterwards or the Earth will spiral into the sun.