transparency with alpha channel

Started by
0 comments, last by leblebi 22 years, 10 months ago
Im trying to implement half-life like ladders, windows, detailed objects etc. using alpha channel transparency.(I need holes in the textures). If I create two different textures both RGB, I can do it. But when I try to utilize the alpha channel, I fail. Does anyone know how to implement this using OpenGL?
Advertisement
try this :
  	glEnable(GL_BLEND);	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);  


Note that when you load the image with the alpha channel, you must make sure that the third parameter in glTexImage2D matches
your format (in the case of a 32bit alpha channel .tga that would be GL_RGBA8)


Feel free to email me.
[email=JValentine_13@hotmail.com]contact[/email]

This topic is closed to new replies.

Advertisement