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);