mirror of
https://github.com/korenkonder/ReDIVA.git
synced 2026-10-02 11:47:56 +03:00
Use texture for empty textures
This commit is contained in:
@@ -790,7 +790,7 @@ namespace rndr {
|
||||
if (effect_texture)
|
||||
gl_state_active_bind_texture_2d(14, effect_texture->glid);
|
||||
else
|
||||
gl_state_active_bind_texture_2d(14, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(14, rctx->empty_texture_2d->glid);
|
||||
|
||||
if (pass_sw[RND_PASSID_REFLECT] && reflect) {
|
||||
RenderTexture& refl_tex = get_render_texture(0);
|
||||
@@ -798,7 +798,7 @@ namespace rndr {
|
||||
uniform_value[U_WATER_REFLECT] = 1;
|
||||
}
|
||||
else {
|
||||
gl_state_active_bind_texture_2d(15, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(15, rctx->empty_texture_2d->glid);
|
||||
uniform_value[U_WATER_REFLECT] = 0;
|
||||
}
|
||||
|
||||
@@ -1084,7 +1084,7 @@ namespace rndr {
|
||||
if (effect_texture)
|
||||
gl_state_active_bind_texture_2d(14, effect_texture->glid);
|
||||
else
|
||||
gl_state_active_bind_texture_2d(14, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(14, rctx->empty_texture_2d->glid);
|
||||
gl_state_bind_sampler(14, rctx->render_samplers[0]);
|
||||
gl_state_set_color_mask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
gl_state_enable_depth_test();
|
||||
@@ -1619,8 +1619,8 @@ static void draw_pass_3d_shadow_set(Shadow* shad, render_context* rctx) {
|
||||
rctx->draw_state->self_shadow = true;
|
||||
}
|
||||
else {
|
||||
gl_state_active_bind_texture_2d(19, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(20, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(19, rctx->empty_texture_2d->glid);
|
||||
gl_state_active_bind_texture_2d(20, rctx->empty_texture_2d->glid);
|
||||
gl_state_active_texture(0);
|
||||
rctx->draw_state->self_shadow = false;
|
||||
}
|
||||
@@ -1674,7 +1674,7 @@ static void draw_pass_3d_shadow_set(Shadow* shad, render_context* rctx) {
|
||||
}
|
||||
|
||||
for (; j < 2; j++)
|
||||
gl_state_active_bind_texture_2d(6 + j, rctx->empty_texture_2d);
|
||||
gl_state_active_bind_texture_2d(6 + j, rctx->empty_texture_2d->glid);
|
||||
gl_state_active_texture(0);
|
||||
|
||||
light_set* set = &rctx->light_set[LIGHT_SET_MAIN];
|
||||
|
||||
Reference in New Issue
Block a user