improve grid rendering

Sat, 05 Mar 2022 00:51:23 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 05 Mar 2022 00:51:23 +0200
changeset 157
869fe95c4e5e
parent 156
65b75beed7e0
child 158
5bd755eaa5a8

improve grid rendering

src/ui/canvas.cpp file | annotate | diff | comparison | revisions
--- a/src/ui/canvas.cpp	Sat Mar 05 00:44:15 2022 +0200
+++ b/src/ui/canvas.cpp	Sat Mar 05 00:51:23 2022 +0200
@@ -145,10 +145,14 @@
 		}
 		// Render grid
 		{
+			glLineWidth(1);
 			glEnable(GL_BLEND);
+			glLineStipple(1, 0x8888);
+			glEnable(GL_LINE_STIPPLE);
 			glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 			this->gridProgram->draw();
 			glDisable(GL_BLEND);
+			glDisable(GL_LINE_STIPPLE);
 		}
 		if (this->worldPosition.has_value())
 		{

mercurial