From d1233da64ae31a381fd484b446e87c2c55ed02b8 Mon Sep 17 00:00:00 2001 From: aura Date: Tue, 10 Mar 2026 06:09:18 +0100 Subject: fix clipping --- src/render/gl_batch.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/render') diff --git a/src/render/gl_batch.h b/src/render/gl_batch.h index 21b8f58..e7f979c 100644 --- a/src/render/gl_batch.h +++ b/src/render/gl_batch.h @@ -102,6 +102,7 @@ inline void gl_batch_draw( GL_BATCH* batch ) { batch->setup_cb( batch ); batch->calls.each( fn( GL_BATCH_CALL* call ) { + gl_set_clip( batch->gl, call->clip_start, call->clip_dim ); for( U32 i = 0; i < call->textures.size; ++i ) { glActiveTexture( GL_TEXTURE0 + i ); glBindTexture( GL_TEXTURE_2D, call->textures.data[i] ? call->textures.data[i]->id : 0 ); @@ -145,7 +146,7 @@ inline GL_BATCH_CALL* gl_batch_get_call( GL_BATCH* batch, GL_TEX if( gl_batch_is_allowed_primitive( primitive ) && n ) { GL_BATCH_CALL* last = &batch->calls.data[n - 1]; if( last->primitive == primitive - && vp_start == last->clip_start && vp_dim == last->viewport_dim + && vp_start == last->viewport_start && vp_dim == last->viewport_dim && clip_start == last->clip_start && clip_dim == last->clip_dim ) { if( !tex ) { -- cgit v1.2.3