From 44f467c81cd88e116b8d7b3c04c1638cfa0b08a7 Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Thu, 23 Nov 2017 16:13:45 +0100 Subject: [PATCH] Bugfix: fix 2/3 of nodes missing. --- src/FlatLayerVisualisation.cpp | 2 +- src/camera.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/FlatLayerVisualisation.cpp b/src/FlatLayerVisualisation.cpp index 576c625..1f9a9bd 100644 --- a/src/FlatLayerVisualisation.cpp +++ b/src/FlatLayerVisualisation.cpp @@ -86,7 +86,7 @@ void FlatLayerVisualisation::render() glVertexPointer(3, GL_FLOAT, 0, vertexBuffer.data()); glColorPointer(3, GL_FLOAT, 0, colorBuffer.data()); - glDrawElements(GL_TRIANGLES, faceCount, GL_UNSIGNED_INT, indexBuffer.data()); + glDrawElements(GL_TRIANGLES, faceCount * 3, GL_UNSIGNED_INT, indexBuffer.data()); glDisable(GL_VERTEX_ARRAY); glDisable(GL_COLOR_ARRAY); diff --git a/src/camera.cpp b/src/camera.cpp index 3bcf570..5759e35 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -30,7 +30,7 @@ static void move(unsigned char key) const auto pitch = deg2rad(camera.angle[1]); cerr << camera.infoLine() << endl; - + if (key == 'w' || key == 's') { dir[0] = sin(yaw) * cos(pitch); dir[1] = -sin(pitch);