From: Mikko Rasa Date: Wed, 20 Nov 2013 12:33:58 +0000 (+0200) Subject: Recreate the icons in Blender using faces instead of lines X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8d73c56899c8a8c5d9e47d240cbe075c9e2286b9;p=r2c2.git Recreate the icons in Blender using faces instead of lines The OpenGL specification gives implementors enough leeway with line drawing that they cannot be used for this sort of pixel-scale graphics. --- diff --git a/icons.blend b/icons.blend new file mode 100644 index 0000000..797e9b1 Binary files /dev/null and b/icons.blend differ diff --git a/icons/beamgate.mesh b/icons/beamgate.mesh index 8db75e7..99c6495 100644 --- a/icons/beamgate.mesh +++ b/icons/beamgate.mesh @@ -1,17 +1,24 @@ -vertices VERTEX2 +vertices NORMAL3 VERTEX3 { - vertex2 0.0 0.0; - vertex2 0.0 0.5; - vertex2 0.2 0.5; - vertex2 1.0 0.0; - vertex2 1.0 0.5; - vertex2 0.8 0.5; + normal3 0 0 1; + vertex3 0.1 0 0; + vertex3 0 0 0; + vertex3 0.1 0.4 0; + vertex3 0 0.5 0; + vertex3 0.2 0.4 0; + vertex3 0.2 0.5 0; + vertex3 0.9 0 0; + vertex3 1 0 0; + vertex3 0.9 0.4 0; + vertex3 1 0.5 0; + vertex3 0.8 0.4 0; + vertex3 0.8 0.5 0; }; -batch LINE_STRIP +batch TRIANGLE_STRIP { - indices 0 1 2; + indices 1 0 3 2 5 4; }; -batch LINE_STRIP +batch TRIANGLE_STRIP { - indices 3 4 5; + indices 6 7 8 9 10 11; }; diff --git a/icons/flex.mesh b/icons/flex.mesh index 2ad62b1..54843de 100644 --- a/icons/flex.mesh +++ b/icons/flex.mesh @@ -1,19 +1,31 @@ -vertices VERTEX2 +vertices NORMAL3 VERTEX3 { - vertex2 0.0 0.45; - vertex2 0.4 0.45; - vertex2 0.0 0.65; - vertex2 0.4 0.65; - vertex2 1.0 0.35; - vertex2 0.6 0.35; - vertex2 1.0 0.55; - vertex2 0.6 0.55; + normal3 0 0 1; + vertex3 0.4 0.3 0; + vertex3 0 0.3 0; + vertex3 0.4 0.4 0; + vertex3 0 0.4 0; + vertex3 0.4 0.6 0; + vertex3 0 0.6 0; + vertex3 0.4 0.7 0; + vertex3 0 0.7 0; + vertex3 1 0.3 0; + vertex3 0.6 0.3 0; + vertex3 1 0.4 0; + vertex3 0.6 0.4 0; + vertex3 1 0.6 0; + vertex3 0.6 0.6 0; + vertex3 1 0.7 0; + vertex3 0.6 0.7 0; }; -batch LINES +batch TRIANGLES { - indices 0 1; - indices 2 3; - indices 4 5; - indices 6 7; + indices 1 0 2; + indices 1 2 3; + indices 5 4 6; + indices 5 6 7; + indices 9 8 10; + indices 9 10 11; + indices 13 12 14; + indices 13 14 15; }; - diff --git a/icons/signal.mesh b/icons/signal.mesh index 8139f32..f0bf662 100644 --- a/icons/signal.mesh +++ b/icons/signal.mesh @@ -1,10 +1,14 @@ -vertices VERTEX2 +vertices NORMAL3 VERTEX3 { - vertex2 0.4 0.0; - vertex2 0.4 1.0; - vertex2 0.6 1.0; + normal3 0 0 1; + vertex3 0.5 0 0; + vertex3 0.4 0 0; + vertex3 0.5 0.9 0; + vertex3 0.4 1 0; + vertex3 0.7 0.9 0; + vertex3 0.7 1 0; }; -batch LINE_STRIP +batch TRIANGLE_STRIP { - indices 0 1 2; + indices 1 0 3 2 5 4; }; diff --git a/icons/trackcircuit.mesh b/icons/trackcircuit.mesh index cea93f2..ceb3828 100644 --- a/icons/trackcircuit.mesh +++ b/icons/trackcircuit.mesh @@ -1,13 +1,35 @@ -vertices VERTEX2 +vertices NORMAL3 VERTEX3 { - vertex2 0.0 0.45; - vertex2 0.3 0.45; - vertex2 1.0 0.45; - vertex2 0.7 0.45; - vertex2 0.3 0.65; + normal3 0 0 1; + vertex3 1 0.6 0; + vertex3 0 0.6 0; + vertex3 1 0.7 0; + vertex3 0 0.7 0; + vertex3 0.2 0.3 0; + vertex3 0 0.3 0; + vertex3 0.2 0.4 0; + vertex3 0 0.4 0; + vertex3 1 0.3 0; + vertex3 0.8 0.3 0; + vertex3 1 0.4 0; + vertex3 0.8 0.4 0; + vertex3 0.7 0.3 0; + vertex3 0.4 0.3 0; + vertex3 0.7 0.4 0; + vertex3 0.3 0.4 0; + vertex3 0.4 0.1 0; + vertex3 0.3 0.1 0; }; -batch LINES +batch TRIANGLE_STRIP { - indices 0 1; - indices 2 3 3 4; + indices 12 14 13 15 16 17; +}; +batch TRIANGLES +{ + indices 1 0 2; + indices 1 2 3; + indices 5 4 6; + indices 5 6 7; + indices 9 8 10; + indices 9 10 11; }; diff --git a/icons/turnout.mesh b/icons/turnout.mesh index 6eda269..6cd292a 100644 --- a/icons/turnout.mesh +++ b/icons/turnout.mesh @@ -1,20 +1,22 @@ -vertices VERTEX2 +vertices NORMAL3 VERTEX3 { - vertex2 0.0 0.3; - vertex2 1.0 0.3; - vertex2 0.34730 0.33038; - vertex2 0.68404 0.42061; - vertex2 1.0 0.56795; - vertex2 0.0 0.5; - vertex2 1.0 0.5; - vertex2 0.31257 0.52735; - vertex2 0.61564 0.60855; - vertex2 0.9 0.74115; + normal3 0 0 1; + vertex3 0.6 0.3 0; + vertex3 0 0.3 0; + vertex3 0.53 0.4 0; + vertex3 0 0.4 0; + vertex3 1 0.8 0; + vertex3 1 0.73 0; + vertex3 0.93 0.8 0; + vertex3 0.67 0.4 0; + vertex3 1 0.3 0; + vertex3 1 0.4 0; }; -batch LINES +batch TRIANGLE_STRIP { - indices 0 1; - indices 0 2 2 3 3 4; - indices 5 6; - indices 5 7 7 8 8 9; + indices 3 1 2 0 7 8 9; +}; +batch TRIANGLE_STRIP +{ + indices 2 7 6 5 4; };