Alpha channel on tga files

Using GLFW
2005-02-15
2012-11-08
  • Augusto Camarotti

    Im a newbie in openGl and wants to do some texture masking on some polygons.
    I thought that it would just load a TGA texture with the alpha channel, but it seems to keep painting all the texture in the polygon.
    Could someone post some short tutorial on how do apply a masked texture to a polygon?

    thanks in advance

    Augusto Camarotti
    
     
    • [ kohai ]

      [ kohai ] - 2005-02-16

      Try adding :

      glDisable(GL_ALPHA_TEST);

      just before you apply your textures, should fix your transparency problem.

       
    • [ kohai ]

      [ kohai ] - 2005-02-16

      Sorry, my mistake, it's glEnable(GL_ALPHA_TEST);

      :)