Sat, 07 Mar 2020 01:20:36 +0200
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