• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# transparency with alpha channel

## Recommended Posts

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?

##### Share on other sites
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.

• ### Forum Statistics

• Total Topics
627708
• Total Posts
2978732

• 21
• 14
• 12
• 22
• 35