Optimize sprite draws a bit
This commit is contained in:
@@ -389,12 +389,14 @@ namespace spr {
|
||||
gl_state_active_bind_texture_2d(1, j.texture[1]);
|
||||
gl_state_bind_sampler(1, j.sampler);
|
||||
}
|
||||
else
|
||||
else if (!gl_state.texture_binding_2d[1])
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d);
|
||||
}
|
||||
else {
|
||||
gl_state_active_bind_texture_2d(0, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d);
|
||||
if (!gl_state.texture_binding_2d[0])
|
||||
gl_state_active_bind_texture_2d(0, rctx->empty_texture_2d);
|
||||
if (!gl_state.texture_binding_2d[1])
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d);
|
||||
}
|
||||
|
||||
shaders_ft.set(j.shader);
|
||||
|
||||
Reference in New Issue
Block a user