From 1e3df56a5c91bce2ef7b03e31156721e2f76a063 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 27 Oct 2021 18:31:23 +0200 Subject: Move vertex buffer generation from init to first update, making init void --- tests/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'tests') 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); -- cgit v1.2.3