drawing lines with triangles

This commit is contained in:
Konstantin Käfer
2014-02-11 15:51:54 +01:00
parent eb9a6b7068
commit bec0ad10c4
34 changed files with 452 additions and 263 deletions

View File

@@ -5,7 +5,8 @@
using namespace llmr;
void LineBuffer::add(vertex_type x, vertex_type y, float ex, float ey, int8_t tx, int8_t ty, int32_t linesofar) {
size_t LineVertexBuffer::add(vertex_type x, vertex_type y, float ex, float ey, int8_t tx, int8_t ty, int32_t linesofar) {
size_t idx = index();
void *data = addElement();
int16_t *coords = static_cast<int16_t *>(data);
@@ -16,8 +17,6 @@ void LineBuffer::add(vertex_type x, vertex_type y, float ex, float ey, int8_t tx
int8_t *extrude = static_cast<int8_t *>(data);
extrude[6] = round(extrudeScale * ex);
extrude[7] = round(extrudeScale * ey);
};
void LineBuffer::addDegenerate() {
add(16383, 16383, 0, 0, 1, 1, 0);
return idx;
}