Bugfix: fix 2/3 of nodes missing.
This commit is contained in:
@@ -86,7 +86,7 @@ void FlatLayerVisualisation::render()
|
|||||||
|
|
||||||
glVertexPointer(3, GL_FLOAT, 0, vertexBuffer.data());
|
glVertexPointer(3, GL_FLOAT, 0, vertexBuffer.data());
|
||||||
glColorPointer(3, GL_FLOAT, 0, colorBuffer.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_VERTEX_ARRAY);
|
||||||
glDisable(GL_COLOR_ARRAY);
|
glDisable(GL_COLOR_ARRAY);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ static void move(unsigned char key)
|
|||||||
const auto pitch = deg2rad(camera.angle[1]);
|
const auto pitch = deg2rad(camera.angle[1]);
|
||||||
|
|
||||||
cerr << camera.infoLine() << endl;
|
cerr << camera.infoLine() << endl;
|
||||||
|
|
||||||
if (key == 'w' || key == 's') {
|
if (key == 'w' || key == 's') {
|
||||||
dir[0] = sin(yaw) * cos(pitch);
|
dir[0] = sin(yaw) * cos(pitch);
|
||||||
dir[1] = -sin(pitch);
|
dir[1] = -sin(pitch);
|
||||||
|
|||||||
Reference in New Issue
Block a user