Use texture for empty textures
This commit is contained in:
@@ -611,13 +611,13 @@ namespace spr {
|
||||
gl_state_bind_sampler(1, j.sampler);
|
||||
}
|
||||
else if (!gl_state.texture_binding_2d[1])
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d->glid);
|
||||
}
|
||||
else {
|
||||
if (!gl_state.texture_binding_2d[0])
|
||||
gl_state_active_bind_texture_2d(0, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(0, rctx->empty_texture_2d->glid);
|
||||
if (!gl_state.texture_binding_2d[1])
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d->glid);
|
||||
}
|
||||
|
||||
shaders_ft.set(j.shader);
|
||||
@@ -1360,9 +1360,9 @@ namespace spr {
|
||||
|
||||
static void draw_sprite_begin() {
|
||||
gl_state_disable_blend(true);
|
||||
gl_state_active_bind_texture_2d(0, rctx->empty_texture_2d, true);
|
||||
gl_state_active_bind_texture_2d(0, rctx->empty_texture_2d->glid, true);
|
||||
gl_state_bind_sampler(0, 0, true);
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d, true);
|
||||
gl_state_active_bind_texture_2d(1, rctx->empty_texture_2d->glid, true);
|
||||
gl_state_bind_sampler(1, 0, true);
|
||||
gl_state_bind_sampler(7, 0, true);
|
||||
gl_state_set_blend_func_separate(GL_ONE, GL_ZERO, GL_ONE, GL_ZERO, true);
|
||||
|
||||
Reference in New Issue
Block a user