aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-10-27 18:31:23 +0200
committerdec05eba <dec05eba@protonmail.com>2021-10-28 13:19:14 +0200
commit1e3df56a5c91bce2ef7b03e31156721e2f76a063 (patch)
tree9fd85a16ab3726581ed4745e100114d2674d9769 /tests
parent3489e8682089c71c42b30eca80d7230b2ecf44f8 (diff)
Move vertex buffer generation from init to first update, making init void
Diffstat (limited to 'tests')
-rw-r--r--tests/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/main.c b/tests/main.c
index bffbf96..53134b9 100644
--- a/tests/main.c
+++ b/tests/main.c
@@ -86,8 +86,7 @@ int main(int argc, char **argv) {
if(mgl_shader_program_finalize(&shader_program) != 0)
return 1;
- if(mgl_vertex_buffer_init(&vertex_buffer, MGL_PRIMITIVE_QUADS, MGL_USAGE_STATIC) != 0)
- return 1;
+ mgl_vertex_buffer_init(&vertex_buffer);
mgl_vertex vertices[4] = {
(mgl_vertex){
@@ -112,7 +111,7 @@ int main(int argc, char **argv) {
}
};
- if(mgl_vertex_buffer_update(&vertex_buffer, vertices, 4) != 0)
+ if(mgl_vertex_buffer_update(&vertex_buffer, vertices, 4, MGL_PRIMITIVE_QUADS, MGL_USAGE_STATIC) != 0)
return 1;
fprintf(stderr, "Font texture width: %d, texture height: %d\n", font.texture.width, font.texture.height);