summaryrefslogtreecommitdiff
path: root/include/llmr/geometry/line_buffer.hpp
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-02-11 15:51:54 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-02-11 15:51:54 +0100
commitbec0ad10c4b460941d08cca597bf352c96820d34 (patch)
tree39fd506db5deeeedc8aebc51b124e6a68ddd7de4 /include/llmr/geometry/line_buffer.hpp
parenteb9a6b7068b9910301bfc7a3b83e114c7545c893 (diff)
downloadqtlocation-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.hpp17
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