kingc8
05-05-2006, 07:50 AM
I'm using GLUT and glpng to put together a simple 2D graphics API.
I'm having trouble finding information on how to achieve the "colorkey" effect on a texture.
I want to make the color 'black' transparent, for sprites. I don't want to use a mask that requires a separate black and white image file.
I've been playing with GL_BLEND and I can't achieve this colorkey effect. The only time I do manage it, involves making the entire texture 50% blend transparent, which is cool, but not what I want.
How do I achieve the color key effect?
Thanks,
Cameron
I'm having trouble finding information on how to achieve the "colorkey" effect on a texture.
I want to make the color 'black' transparent, for sprites. I don't want to use a mask that requires a separate black and white image file.
I've been playing with GL_BLEND and I can't achieve this colorkey effect. The only time I do manage it, involves making the entire texture 50% blend transparent, which is cool, but not what I want.
How do I achieve the color key effect?
Thanks,
Cameron