diff options
| author | aura <nw@moneybot.cc> | 2026-03-10 06:09:18 +0100 |
|---|---|---|
| committer | aura <nw@moneybot.cc> | 2026-03-10 06:09:18 +0100 |
| commit | d1233da64ae31a381fd484b446e87c2c55ed02b8 (patch) | |
| tree | 4d235a0b2d91ed09d812ef236f5f3dbb9cb62f91 /src/render | |
| parent | 4d83331b3fbeaa16eeb360c06f9f1ffc41a9326f (diff) | |
fix clipping
Diffstat (limited to 'src/render')
| -rw-r--r-- | src/render/gl_batch.h | 3 |
1 files changed, 2 insertions, 1 deletions
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<VERTEX>* batch ) { batch->setup_cb( batch ); batch->calls.each( fn( GL_BATCH_CALL<VERTEX>* 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<VERTEX>* gl_batch_get_call( GL_BATCH<VERTEX>* batch, GL_TEX if( gl_batch_is_allowed_primitive( primitive ) && n ) { GL_BATCH_CALL<VERTEX>* 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 ) { |
