diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-02-11 15:51:54 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-02-11 15:51:54 +0100 |
commit | bec0ad10c4b460941d08cca597bf352c96820d34 (patch) | |
tree | 39fd506db5deeeedc8aebc51b124e6a68ddd7de4 /include/llmr/geometry/line_buffer.hpp | |
parent | eb9a6b7068b9910301bfc7a3b83e114c7545c893 (diff) | |
download | qtlocation-mapboxgl-bec0ad10c4b460941d08cca597bf352c96820d34.tar.gz |
drawing lines with triangles
Diffstat (limited to 'include/llmr/geometry/line_buffer.hpp')
-rw-r--r-- | include/llmr/geometry/line_buffer.hpp | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/include/llmr/geometry/line_buffer.hpp b/include/llmr/geometry/line_buffer.hpp index ccbdce1191..a18ea810ae 100644 --- a/include/llmr/geometry/line_buffer.hpp +++ b/include/llmr/geometry/line_buffer.hpp @@ -5,8 +5,7 @@ namespace llmr { - -class LineBuffer : public Buffer< +class LineVertexBuffer : public Buffer< 8 // 2 coordinates per vertex + 1 linesofar + 1 extrude coord pair == 4 (== 8 bytes) > { public: @@ -31,20 +30,10 @@ public: * @param {number} tx texture normal * @param {number} ty texture normal */ - void add(vertex_type x, vertex_type y, float ex, float ey, int8_t tx, int8_t ty, int32_t linesofar = 0); - - /* - * Add a degenerate triangle to the buffer - * - * > So we need a way to get from the end of one triangle strip - * to the beginning of the next strip without actually filling triangles - * on the way. We can do this with "degenerate" triangles: We simply - * repeat the last coordinate of the first triangle strip and the first - * coordinate of the next triangle strip. - */ - void addDegenerate(); + size_t add(vertex_type x, vertex_type y, float ex, float ey, int8_t tx, int8_t ty, int32_t linesofar = 0); }; + } #endif |