glSecondaryColor without alpha :-(


Is it just me or is it really a pitty that glSecondaryColor() doesn’t support alpha. I have a large scene with lot’s of vertex arrays or VBO’s including color arrays. I would like to fade the whole scene by adding an alpha parameter to the render function without having to update the color arrays. I hoped that glSecondaryColor() could do the trick (because i’m not using any lighting at the moment), but no such luck. I tried doing the multiplication myself with glSecondaryColor3f(RA, GA, B*A) which gives the correct color, but blending fails because you don’t actually modify the alpha values.

Does anyone know an easy sollution for this or do i have to solve it in the shaders?

Kind Regards,

Daniel Dekkers

You may use glBlendColorEXT() in conjuction with

This way you can control the blend factor for the whole geometry without having to fiddle with material or light colors. The only drawback is that you only have one alpha value for the whole batch.