DayLateDon
03-23-2003, 11:39 PM
Hello ...
I'm having a problem getting OpenGL to properly display a textured quad using an alpha channel.
Below is a blown-up picture showing the difference between what I get (left, using OpenGL) and what I want (right). The speckled stuff is a background.
Where the texture-image (whether a ".png" or a ".tif") is completely transparent or completely opaque, OpenGL renders it properly. Not so in the transitional regions between transparent and fully opaque. (There's a very faint, nearly transparent white glow about the top of the "peg".) OpenGL makes those regions unusually dark.
The image is loaded as a 32-bit texture, blending is enabled. I've tried altering parameters of glBlendFunc() --the image shown uses glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)-- to no avail. I'm not sure what else to try.
This is in a custom OpenGLView in a Cocoa project in Mac OS X, using an ATi Rage 128 Pro graphics card (on an indigo iMac). Image loading code follows a NeHe tutorial.
Pointers?
Thanks,
DayLateDon
I'm having a problem getting OpenGL to properly display a textured quad using an alpha channel.
Below is a blown-up picture showing the difference between what I get (left, using OpenGL) and what I want (right). The speckled stuff is a background.
Where the texture-image (whether a ".png" or a ".tif") is completely transparent or completely opaque, OpenGL renders it properly. Not so in the transitional regions between transparent and fully opaque. (There's a very faint, nearly transparent white glow about the top of the "peg".) OpenGL makes those regions unusually dark.
The image is loaded as a 32-bit texture, blending is enabled. I've tried altering parameters of glBlendFunc() --the image shown uses glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)-- to no avail. I'm not sure what else to try.
This is in a custom OpenGLView in a Cocoa project in Mac OS X, using an ATi Rage 128 Pro graphics card (on an indigo iMac). Image loading code follows a NeHe tutorial.
Pointers?
Thanks,
DayLateDon