I want to draw a polygon that has a line color and a different fill color, which is the best way to do this?
I was trying to use:
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)
to draw the polygon fill color and then call
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE)
to draw its countour lines.
When I do this, if i have two consecutive polygons drawn this way the render scene sometimes doesn’t display the contour line between them…
I understand that sometimes you don’t see the edge lines.
Do you call glPolygonOffset before drawing lines ? glPolygonOffset enables to draw the lines in front of the polygon face.
NB: I am a beginner. I am here to ask questions, not to contribute… Warning !