c++ - how to draw polygons in OpenGL that have an outline drawn
![](https://i.stack.imgur.com/7bRKU.jpg)
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?
![](https://www3.ntu.edu.sg/home/ehchua/programming/opengl/images/Output_GL07BouncingBall.png)
An introduction on OpenGL with 2D Graphics - OpenGL Tutorial
![](https://miro.medium.com/v2/resize:fit:1226/0*-6SodTvXpi5swldk.png)
Drawing Antialiased Lines with OpenGL, by Mapbox
![](https://learnopengl.com/img/advanced/instancing_quads.png)
LearnOpenGL - Instancing
![](https://i.stack.imgur.com/EeQT4.png)
c++ - Is there a better way to do this? - Stack Overflow
![](https://www.informit.com/content/images/chap3_9780321712615/elementLinks/03fig25.jpg)
Connecting The Dots, Basic Rendering in OpenGL
![](https://www.codeproject.com/KB/openGL/TranslationController/image001.jpg)
Interactive Techniques in Three-dimensional Scenes (Part 1): Moving 3D Objects with the Mouse using OpenGL 2.1 - CodeProject
![](https://www.sfml-dev.org/tutorials/2.0/images/graphics-shape-line-primitive.png)
Shapes (SFML / Learn / 2.0 Tutorials)
![](https://upload.wikimedia.org/wikipedia/commons/3/31/Glstart_tut3_5.jpg)
OpenGL Programming/GLStart/Tut3 - Wikibooks, open books for an open world
![](https://doc.qt.io/qt-6/images/qpainter-painterpaths.png)
QPainter Class
![](https://www.informit.com/content/images/chap2_9780321552624/elementLinks/02_08_geometric_primitive.jpg)
Describing Points, Lines, and Polygons, OpenGL Programming Guide: State Management and Drawing Geometric Objects
![](https://open.gl/media/img/c2_dc2.png)
OpenGL - Drawing polygons