Skip to content

Commit

Permalink
renderer: Fix unindexed mesh being drawn with wrong primitive.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Feb 15, 2024
1 parent 18d661b commit 5e8aa7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libopenage/renderer/opengl/geometry.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015-2023 the openage authors. See copying.md for legal info.
// Copyright 2015-2024 the openage authors. See copying.md for legal info.

#include "geometry.h"

Expand Down Expand Up @@ -68,7 +68,7 @@ void GlGeometry::draw() const {
glDrawElements(mesh.primitive, mesh.vert_count, *mesh.index_type, nullptr);
}
else {
glDrawArrays(GL_TRIANGLE_STRIP, 0, mesh.vert_count);
glDrawArrays(mesh.primitive, 0, mesh.vert_count);
}

break;
Expand Down

0 comments on commit 5e8aa7f

Please sign in to comment.