summaryrefslogtreecommitdiff
path: root/src/render/gl_batch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/gl_batch.h')
-rw-r--r--src/render/gl_batch.h3
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 ) {