diff -r 43636d6a6e25 -r a3231310d66d src/mesh.c --- a/src/mesh.c Wed Jun 11 23:38:55 2025 +0200 +++ b/src/mesh.c Thu Jun 12 22:44:49 2025 +0200 @@ -82,7 +82,7 @@ asc_mesh_allocate_buffers(mesh, 1); } - unsigned required_memory = 4 * sizeof(AscMeshVertex2d); + unsigned required_memory = 4 * sizeof(asc_vertex2d); // free any previous data if (mesh->vtx_data && mesh->vtx_data_size < required_memory) { @@ -91,14 +91,14 @@ } // allocate memory - AscMeshVertex2d *data; + asc_vertex2d *data; if (mesh->vtx_data == NULL) { asc_dprintf("Create plane in VBO %u and VAO %u", mesh->vbo, mesh->vao); mesh->vtx_data_size = required_memory; data = cxMallocDefault(mesh->vtx_data_size); mesh->vtx_data = (float*) data; } else { - data = (AscMeshVertex2d*) mesh->vtx_data; + data = (asc_vertex2d*) mesh->vtx_data; } mesh->vtx_count = 4; @@ -124,8 +124,8 @@ glBufferData(GL_ARRAY_BUFFER, mesh->vtx_data_size, mesh->vtx_data, GL_STATIC_DRAW); // TODO: this should not be repeated for every adjustment - but it will be moved to the batch renderer anyway glBindVertexArray(mesh->vao); - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(AscMeshVertex2d), (void*)offsetof(AscMeshVertex2d, pos)); + glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(asc_vertex2d), (void*)offsetof(asc_vertex2d, pos)); glEnableVertexAttribArray(0); - glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(AscMeshVertex2d), (void*)offsetof(AscMeshVertex2d, uv)); + glVertexAttribPointer(1, 2, GL_FLOAT, GL_FALSE, sizeof(asc_vertex2d), (void*)offsetof(asc_vertex2d, uv)); glEnableVertexAttribArray(1); }