diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-02-20 11:11:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-20 11:11:11 +0100 |
commit | 4b562aaf0c734bd774aeec0763056ff218a7fda6 (patch) | |
tree | 0b647b36eb3964b59b589097d754e139686a349d /drivers | |
parent | 55f00d9655ca3f9ccfdcac2fba8081df9869ba16 (diff) | |
parent | ea57a19b34df4d60e740987f858ae225bbd4cc53 (diff) |
Merge pull request #16834 from bojidar-bg/x-rendering-gles3-bug
Fix a rendering bug with screen_texture
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles3/rasterizer_canvas_gles3.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp index 37a2450377..96fa800206 100644 --- a/drivers/gles3/rasterizer_canvas_gles3.cpp +++ b/drivers/gles3/rasterizer_canvas_gles3.cpp @@ -993,13 +993,11 @@ void RasterizerCanvasGLES3::_copy_texscreen(const Rect2 &p_rect) { glBindFramebuffer(GL_FRAMEBUFFER, storage->frame.current_rt->fbo); //back to front glViewport(0, 0, storage->frame.current_rt->width, storage->frame.current_rt->height); - state.canvas_shader.bind(); //back to canvas - _bind_canvas_texture(state.current_tex, state.current_normal); + // back to canvas, force rebind + state.using_texture_rect = true; + _set_texture_rect_mode(false); - if (state.using_texture_rect) { - state.using_texture_rect = false; - _set_texture_rect_mode(state.using_texture_rect, state.using_ninepatch); - } + _bind_canvas_texture(state.current_tex, state.current_normal); glEnable(GL_BLEND); } |