WIP: bugfixing
This commit is contained in:
+3
-2
@@ -43,8 +43,9 @@ void mesh::render(bool flat_shaded) {
|
||||
}
|
||||
|
||||
// fill in buffer
|
||||
int i = 0;
|
||||
for (auto &f: facets) {
|
||||
size_t i = 0;
|
||||
for (size_t face_index = 0; i < facets.size(); i++) {
|
||||
auto& f = facets[face_index];
|
||||
for (int j = 0; j < 3; j++) {
|
||||
vbo_data[i++] = vertices[f.vertices[j]].position.x;
|
||||
vbo_data[i++] = vertices[f.vertices[j]].position.y;
|
||||
|
||||
Reference in New Issue
Block a user