summaryrefslogtreecommitdiff
path: root/src/render
diff options
context:
space:
mode:
authornavewindre <boneyaard@gmail.com>2025-09-10 12:34:36 +0200
committernavewindre <boneyaard@gmail.com>2025-09-10 12:34:36 +0200
commit496e2bbc68aaaaf99d935233ce3ba0636f1bf0cf (patch)
treea03ff1bec42f8a691dc38ad4a314839361b1a5ab /src/render
parent235926dadb686589f0b5480162c3ab929159e570 (diff)
fix batch render
Diffstat (limited to 'src/render')
-rw-r--r--src/render/gl_batch.h2
1 files changed, 2 insertions, 0 deletions
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<VERTEX>* batch ) {
template <typename VERTEX>
inline void gl_batch_draw( GL_BATCH<VERTEX>* 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<VERTEX>* batch ) {
gl_set_viewport( batch->gl, vp_start, vp_dim );
gl_set_clip( batch->gl, clip_start, clip_dim );
+ glBindVertexArray( 0 );
}
template <typename VERTEX>