glColor4f() - effect of alpha value

前端 未结 1 1620
囚心锁ツ
囚心锁ツ 2021-02-15 17:12

I am using glColor4f(). Surprisingly, changing the alpha, i.e., the fourth argument doesn\'t cause any change in transparency. The code segment is:

const GLfloat         


        
相关标签:
1条回答
  • 2021-02-15 17:34

    You need to enable blending if you want to use transparency:

    glEnable(GL_BLEND);

    See also glBlendFunc to setup the blending function.

    0 讨论(0)
提交回复
热议问题