I would cheat. I would create polygons in a 3d set in the form of meshes and create different meshes for the borders. Then draw the polygon first and then the border using the same transforms using glDepthFunc(GL_LEQUAL)
.
In this way, you can also give the border a nice outfit: you can make them look like they were drawn with a pen or pencil, or something else. In addition, this solution is well suited for modern OpenGL, and when using GL_POLYGON
not .
source share