I am trying to draw a textured rectangle, using two triangles. I want the black pixels in my texture to be transparent and everything else to be visible.
I have used some code I found on this forum, but the resultant texture still shows black
basically I read the raw rgb data, look for
rgb triplets with value 0,0,0 and copy
the same rgb values into an rgba data block
replacing the alpha component with 0 for black and 1 for anything else.
I then call gluRGBuild2dmipmaps specifying rgba valued data.
Finally, I draw the texture using:
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
and the black pixels come out as solid.
I can email the code to anyone who can assist.