PDA

View Full Version : how to avoid colors blended ...



jyoung77
03-30-2007, 12:50 PM
Hi,

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.

Tony

V-man
03-30-2007, 05:34 PM
Maybe you have glEnable(GL_BLEND) and some blending state that doesn't use alpha like glBlendFunc(GL_ONE, GL_ONE)

Post some code

Jon723
03-31-2007, 05:31 AM
Yea, I agree with V-man. Before you draw your objects I would disable blending and, if needed re-enable blending afterwards.