diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-01 19:01:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-01 19:01:18 +0100 |
commit | c7c87a06244af46271e38738260f922b5fb82559 (patch) | |
tree | 525f1830ef66e4c4710c33ab63ca2019670a4f63 /drivers | |
parent | b16c309f82c77d606472c3c721a1857e323a09e7 (diff) | |
parent | 9ba6849cf4191e1c037e7416d21f28b19e0e5f43 (diff) |
Merge pull request #24687 from DavidSichma/draw-rect-rot
fix draw_rect rotation
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_canvas_gles2.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gles2/rasterizer_canvas_gles2.cpp b/drivers/gles2/rasterizer_canvas_gles2.cpp index 6ba5b1c742..375c555d9e 100644 --- a/drivers/gles2/rasterizer_canvas_gles2.cpp +++ b/drivers/gles2/rasterizer_canvas_gles2.cpp @@ -496,6 +496,10 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur src_rect.position + Vector2(0.0, src_rect.size.y), }; + if (r->flags & CANVAS_RECT_TRANSPOSE) { + SWAP(uvs[1], uvs[3]); + } + if (r->flags & CANVAS_RECT_FLIP_H) { SWAP(uvs[0], uvs[1]); SWAP(uvs[2], uvs[3]); @@ -505,10 +509,6 @@ void RasterizerCanvasGLES2::_canvas_item_render_commands(Item *p_item, Item *cur SWAP(uvs[1], uvs[2]); } - if (r->flags & CANVAS_RECT_TRANSPOSE) { - SWAP(uvs[1], uvs[3]); - } - state.canvas_shader.set_uniform(CanvasShaderGLES2::COLOR_TEXPIXEL_SIZE, texpixel_size); bool untile = false; |