drawing lines with triangles
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user