Fixed brick code which caused memory override for mesh data and fucked up rendering
This commit is contained in:
@@ -42,6 +42,7 @@ BEGIN_NAMESPACE
|
||||
|
||||
// fill in buffer
|
||||
size_t i = 0;
|
||||
size_t face_index = 0;
|
||||
for (auto& f: facets) {
|
||||
for (int j = 0; j < 3; j++) {
|
||||
vbo_data[i++] = vertices[f.vertices[j]].position.x;
|
||||
@@ -59,6 +60,7 @@ BEGIN_NAMESPACE
|
||||
vbo_data[i++] = f.text_coords[j].x;
|
||||
vbo_data[i++] = f.text_coords[j].y;
|
||||
}
|
||||
face_index++;
|
||||
}
|
||||
|
||||
glBindVertexArray(vao_id);
|
||||
|
||||
Reference in New Issue
Block a user