src/ui/canvas.cpp

changeset 119
24275a4064f4
parent 118
8e1c9f18ae15
child 120
8c9fff699241
--- a/src/ui/canvas.cpp	Tue Jul 27 16:29:00 2021 +0300
+++ b/src/ui/canvas.cpp	Wed Jul 28 08:23:09 2021 +0300
@@ -161,6 +161,16 @@
 			this->axesProgram->draw();
 			glDisable(GL_LINE_SMOOTH);
 		}
+		// Render vertices
+		{
+			glLineWidth(2);
+			glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
+			glEnable(GL_LINE_SMOOTH);
+			glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+			this->vertexProgram->draw();
+			glDisable(GL_LINE_SMOOTH);
+			glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+		}
 		// Render grid
 		{
 			glEnable(GL_BLEND);
@@ -168,14 +178,6 @@
 			this->gridProgram->draw();
 			glDisable(GL_BLEND);
 		}
-		// Render vertices
-		{
-			glLineWidth(2);
-			glEnable(GL_LINE_SMOOTH);
-			glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
-			this->vertexProgram->draw();
-			glDisable(GL_LINE_SMOOTH);
-		}
 		if (this->worldPosition.has_value())
 		{
 			QPainter painter{this};

mercurial