src/mesh.c

changeset 82
4e1e698f4b0d
parent 81
84a546e282b7
child 89
e1f682a8a145
equal deleted inserted replaced
81:84a546e282b7 82:4e1e698f4b0d
61 61
62 glDeleteBuffers(count, buffers); 62 glDeleteBuffers(count, buffers);
63 glDeleteVertexArrays(count, arrays); 63 glDeleteVertexArrays(count, arrays);
64 asc_error_catch_all_gl(); 64 asc_error_catch_all_gl();
65 } 65 }
66
67 void asc_mesh_draw_triangle_strip(AscMesh *mesh) {
68 glBindVertexArray(mesh->vao);
69 glDrawArrays(GL_TRIANGLE_STRIP, 0, mesh->vertices);
70 #ifndef NDEBUG
71 // only unbind in debug mode to detect accidental re-use of the wrong VAO
72 glBindVertexArray(0);
73 #endif
74 }

mercurial