From 496e2bbc68aaaaf99d935233ce3ba0636f1bf0cf Mon Sep 17 00:00:00 2001 From: navewindre Date: Wed, 10 Sep 2025 12:34:36 +0200 Subject: fix batch render --- src/render/gl_batch.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/render/gl_batch.h') diff --git a/src/render/gl_batch.h b/src/render/gl_batch.h index 944521f..7ca9fe3 100644 --- a/src/render/gl_batch.h +++ b/src/render/gl_batch.h @@ -91,6 +91,7 @@ inline void gl_batch_empty( GL_BATCH* batch ) { template inline void gl_batch_draw( GL_BATCH* batch ) { glUseProgram( batch->shader->id ); + glBindVertexArray( batch->gl->vao ); VEC2 vp_start, vp_dim, clip_start, clip_dim; gl_get_viewport( batch->gl, &vp_start, &vp_dim ); @@ -117,6 +118,7 @@ inline void gl_batch_draw( GL_BATCH* batch ) { gl_set_viewport( batch->gl, vp_start, vp_dim ); gl_set_clip( batch->gl, clip_start, clip_dim ); + glBindVertexArray( 0 ); } template -- cgit v1.2.3