how to avoid colors blended ...


I draw two polygons with different colors. When one of the polygons is rotated to the front of the other, their colors are blended together. How to avoid this behavior? The alpha value for glColor4f() (the 4th value) used to set colors for polygons’ vertices are always 1. So the polygons are not translucent. What else should I do? Please advise. Thanks.


Maybe you have glEnable(GL_BLEND) and some blending state that doesn’t use alpha like glBlendFunc(GL_ONE, GL_ONE)

Post some code

Yea, I agree with V-man. Before you draw your objects I would disable blending and, if needed re-enable blending afterwards.