How can I draw a shape like this in OpenGL?
I mean, I know how to draw polygons in OpenGL. I want to know how to make the outline black and the fill color ( for example ) yellow?
You have 5 vertices. Draw a GL_POLYGON
with them and then then a GL_LINE_LOOP
.
Note that GL_POLYGON
is only valid for convex polygons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With