diff options
Diffstat (limited to 'src/render/gl_batch.h')
| -rw-r--r-- | src/render/gl_batch.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/render/gl_batch.h b/src/render/gl_batch.h index 944521f..12b512f 100644 --- a/src/render/gl_batch.h +++ b/src/render/gl_batch.h @@ -133,6 +133,11 @@ inline GL_BATCH_CALL<VERTEX>* gl_batch_get_call( GL_BATCH<VERTEX>* batch, GL_TEX && vp_start == last->clip_start && vp_dim == last->viewport_dim && clip_start == last->clip_start && clip_dim == last->clip_dim ) { + if( !tex ) { + *texid = SAMPLER_ID_NONE; + return last; + } + I32 idx = last->textures.idx_of( tex ); if( idx != -1 ) { *texid = idx; @@ -187,7 +192,7 @@ inline void gl_batch_insert( call = gl_batch_get_call( batch, tex, primitive, &texid ); for( U32 i = 0; i < count; ++i ) { - vertices[i].sampler = (!!tex)? texid : SAMPLER_ID_NONE; + vertices[i].sampler = texid; call->vertices.push( vertices[i] ); } } |
