PDA

View Full Version : KGL: Alphachannel for textures?



Artchi
June 18th, 2005, 17:19
Hello! I'm using KGL from KOS 1.1.9 and I want to draw the textures with an alpha channel. It works very well to show transparancy but alpha channel doesn't work.

If I change glColor(1.0f, 1.0f, 1.0f, 0.0f); to glColor(1.0f, 1.0f, 1.0f, 0.8f); I would expect that the texture has an alpha of 80%, right? But it has no effect. :(

How I can draw textures with alpha? Is there another solution?

Best regards
Artchi

Phantom
June 18th, 2005, 18:10
Try doing something like this (before glColor):


glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);