Bugfix: fix 2/3 of nodes missing.

This commit is contained in:
2017-11-23 16:13:45 +01:00
parent 29f115341e
commit 44f467c81c
2 changed files with 2 additions and 2 deletions

View File

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

View File

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