negative axes are now drawn in darker color

Sat, 07 Mar 2020 01:20:36 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 07 Mar 2020 01:20:36 +0200
changeset 74
6b51e7b7c459
parent 73
97df974b5ed5
child 75
204dc77e5654

negative axes are now drawn in darker color

src/gl/axesprogram.cpp file | annotate | diff | comparison | revisions
--- a/src/gl/axesprogram.cpp	Mon Mar 09 14:21:54 2020 +0200
+++ b/src/gl/axesprogram.cpp	Sat Mar 07 01:20:36 2020 +0200
@@ -18,7 +18,6 @@
 
 #include "axesprogram.h"
 
-// Based on https://stackoverflow.com/q/30842755
 const char vertexShaderSource[] = R"(
 #version 330 core
 
@@ -57,14 +56,20 @@
 	};
 }
 
-static AxesVertex data[] =
+static const AxesVertex data[] =
 {
-	AxesVertex{{-10000, 0, 0}, {1, 0, 0}},
 	AxesVertex{{10000, 0, 0}, {1, 0, 0}},
-	AxesVertex{{0, -10000, 0}, {0, 1, 0}},
+	AxesVertex{{0, 0, 0}, {1, 0, 0}},
+	AxesVertex{{-10000, 0, 0}, {0.5, 0, 0}},
+	AxesVertex{{0, 0, 0}, {0.5, 0, 0}},
 	AxesVertex{{0, 10000, 0}, {0, 1, 0}},
-	AxesVertex{{0, 0, -10000}, {0, 0, 1}},
+	AxesVertex{{0, 0, 0}, {0, 1, 0}},
+	AxesVertex{{0, -10000, 0}, {0, 0.5, 0}},
+	AxesVertex{{0, 0, 0}, {0, 0.5, 0}},
 	AxesVertex{{0, 0, 10000}, {0, 0, 1}},
+	AxesVertex{{0, 0, 0}, {0, 0, 1}},
+	AxesVertex{{0, 0, -10000}, {0, 0, 0.5}},
+	AxesVertex{{0, 0, 0}, {0, 0, 0.5}},
 };
 
 const char* AxesProgram::vertexShaderSource() const

mercurial