diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-02 19:42:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-02 19:42:10 +0100 |
commit | d930c909f250f8584d38784cfaebb6a312696ef0 (patch) | |
tree | adfca0f8664bcfaa1314ea318aef3980d206065c /drivers | |
parent | 03b8168c2e6c7a116f58aebb0f1ff790b2ec20c6 (diff) | |
parent | 4e73274837c0e65aa92fbd17a6b07679fc95a16b (diff) |
Merge pull request #24715 from dragmz/patch-4
Fix negative size rectangle drawing in GLES2
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_canvas_gles2.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp index 375c555d9e..e3d4884a5a 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_gles2.cpp @@ -465,12 +465,11 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur state.canvas_shader.use_material((void *)p_material); } - Size2 abs_size = r->rect.size.abs(); Vector2 points[4] = { r->rect.position, - r->rect.position + Vector2(abs_size.x, 0.0), - r->rect.position + abs_size, - r->rect.position + Vector2(0.0, abs_size.y), + r->rect.position + Vector2(r->rect.size.x, 0.0), + r->rect.position + r->rect.size, + r->rect.position + Vector2(0.0, r->rect.size.y), }; if (r->rect.size.x < 0) { |