I am trying to draw a bitmap with certain portions/pixels that will be transparent. Right now I am using glut and creating a texture with RGBA color type. For the portions of the bitmap that I want transparent I set A=0, and A=255 for the rest.
I cant quite figure out if it is just proper glBlendFunc parameters that I need… or if I am doing this all wrong?
If I do
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
then the portions of the bitmap that I want transparent are indeed transparent, but then they are just whatever the color that was las set by glColor4f(…), and not the colors of the background
All of the tutorials I see online teach how to set the transparency for the whole texture/bitmap. I just want to be able to set for specific pixels somehow.
Any leads? Thanks in advance