glClearColor Alpha Value
Quick question that should be easy for you openGL gurus -- What does the alpha value in glClearColor do, and how will it effect my drawing?
Thanks.
glClearColor specifies the values used when the colour buffer is cleared.
If the alpha value was set to 0 it would be completely transparent, but if it was set to 1 it would be opaque. There's not much use to the alpha value unless you use special effects such as translucency, so it's best to set it to 1.0 if you don't.
If the alpha value was set to 0 it would be completely transparent, but if it was set to 1 it would be opaque. There's not much use to the alpha value unless you use special effects such as translucency, so it's best to set it to 1.0 if you don't.
It gives the framebuffer an alpha value. So you can use it with say, GL_DST_ALPHA in glBlendFunc
Transparent:
Opaque:
glClearColor(0.0, 0.0, 0.0, 0.0);
Opaque:
glClearColor(0.0, 0.0, 0.0, 1.0);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement