views:

1145

answers:

2

I have an image. Over it I draw a semi transparent polygon. Over the semi transparent polygon I draw a line.

I cannot seem to get this line to be white. It is almost as though it is blending with the image or polygon.

 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
 glDrawArrays(GL_LINE_LOOP, 0, area.polygonShapeData.totalPoints);

What could I be doing to make this line not be white? It comes out a darker gray.

+4  A: 

Perhaps you've got blending enabled in something like GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA mode? Try glDisable(GL_BLEND) and see if you get better results.

Drew Hall
I put glDisable(GL_Blend right before the glcolors line but it is still coming out gray
Mel
+3  A: 

Do you use anti-aliasing? I've noticed hair thin lines coming out faded if GL_LINE_SMOOTH is enabled. Also try increasing the width with glLineWidth.

Oz
Both good points--antialiasing messes with intensity values to try to put the right amount of intensity on the idealized (vs. scan converted) line.
Drew Hall
@Mel: Did this do the trick?
Drew Hall
yeah...did it ?
dontWatchMyProfile