Is supposedly the code that will "make sure the transparent part of the texture isn't drawn", according to this book I'm reading. What color in the texture image file will be treated as transparent though?

Ok. So I assume I would have to save and load my texture as a targa or some such thing in RGBA format, instead of using pict like I am now? And in photoshop or whatever, I just make sure that whatever parts of my texture that I want to be transparent are alpha of 1?

Quote:Originally posted by LongJumper Ok. So I assume I would have to save and load my texture as a targa or some such thing in RGBA format, instead of using pict like I am now? And in photoshop or whatever, I just make sure that whatever parts of my texture that I want to be transparent are alpha of 1?

So I made a targa file in GraphicConverter, added an alpha mask where the part I want drawn is black(0 alpha) and the other part is white(255, 1?). I don't know to reverse them or not, but either way my code isn't blocking out any of it.

What I want to do is have a obviously square texture drawn into a quad, but only this little circle in the middle showing(the button).

I'm pretty sure the image file(aside from the reversal or the alpha channel values) is set up fine, it loads up as a GL_RGBA and I create the texture that way.

What are appropriate values to send ot glBlendFunc and glAlphaFunc to get this working?

I don't know if you have any experience with GraphicConverter(Everyone here seems to though). I just Add Alpha Mask/Channel, then I do a Show Alpha Channel, and then I draw a black dot in the center, save it as a TGA. Doesn't seem to be saving the alpha channel maybe? I dunna. I have to be missing something somewhere, because it doesn't work

edit: acutally, no matter what I do to the image file nothing changes.

Thanks for all the help. Using that other image really narrowed down where my problem was...it was when I load the texture, for some reason I had a 3 in my internalFormat variable passed to gluBuildMipmaps... that was so annoying