Draw a white line in opengl es

I have an image. Above it I draw a semi-transparent polygon. Through the semi-transparent polygon, I draw a line.

It seems to me that this line will not be white. It's almost like blending with an image or polygon.

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

      

What can I do to prevent this line from being white? It turns out dark gray.

+2


source to share


2 answers


Are you using anti-aliasing? I noticed that the fine hair lines disappear if GL_LINE_SMOOTH is enabled . Also try increasing the width with glLineWidth .



+3


source


Perhaps you enabled blending in GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA mode? Try glDisable (GL_BLEND) and see if you have better results.



+4


source







All Articles