--- a/src/mesh.c Sun Jan 25 19:45:24 2026 +0100 +++ b/src/mesh.c Sun Feb 01 13:52:50 2026 +0100 @@ -25,6 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include "ascension/context.h" #include "ascension/error.h" #include "ascension/mesh.h" @@ -65,8 +66,12 @@ } void asc_mesh_draw_triangle_strip(const AscMesh *mesh) { + AscGLCounters *counters = &asc_active_glctx->ctr; + counters->draw_calls++; + counters->vertices_rendered += mesh->vtx_count; + counters->triangles_rendered += mesh->vtx_count - 2; glBindVertexArray(mesh->vao); - glDrawArrays(GL_TRIANGLE_STRIP, 0, mesh->vtx_count); + glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei) mesh->vtx_count); asc_error_catch_gl("Drawing mesh"); #ifndef NDEBUG // only unbind in debug mode to detect accidental re-use of the wrong VAO