PDA

View Full Version : Alpha parameter in glClearColor()?



05-10-2006, 03:29 AM
I can not seem to notice any visual change in my scene when changing the value if this parameter. What effect does the alpha parameter have in glClearColor() function?

Thank you

Relic
05-10-2006, 03:44 AM
It's just the value which is written into the color buffer on a glClear() operation if that has an alpha channel.

This will only have a (visual) effect if following operations use/read this alpha value.
Examples are alpha blending with destination alpha in the bleding function, or render to texture and usage of the alpha in the resulting texture data, or readback of RGBA data to save to a file, etc.

zeoverlord
05-10-2006, 05:02 AM
Yes, if you use clear on something like a fbo the alpha value does play a semi significant role.

V-man
05-12-2006, 02:10 PM
It doesn't have to be a FBO, You can use it on for the backbuffer like Relic said.