diff options
author | Carl Olsson <carl.olsson@gmail.com> | 2015-02-13 10:56:53 +1000 |
---|---|---|
committer | Carl Olsson <carl.olsson@gmail.com> | 2015-02-13 10:56:53 +1000 |
commit | 6a38ab1b43e4a107a28c52ba2036a4886794f625 (patch) | |
tree | 397140fc1ea7e4cacc863473f2d25ca19af6d079 /drivers | |
parent | 5c3c730bad5591f4e3707c26f7c2038157c5c127 (diff) |
Reorder tile transforms so transpose occurs before flips. Much more intuitive for flipping transposed tiles.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 62fb271930..2b70cec3fa 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -8119,6 +8119,9 @@ void RasterizerGLES2::_draw_textured_quad(const Rect2& p_rect, const Rect2& p_sr (p_src_region.pos.y+p_src_region.size.height)/p_tex_size.height) }; + if (p_transpose) { + SWAP( texcoords[1], texcoords[3] ); + } if (p_h_flip) { SWAP( texcoords[0], texcoords[1] ); SWAP( texcoords[2], texcoords[3] ); @@ -8127,9 +8130,6 @@ void RasterizerGLES2::_draw_textured_quad(const Rect2& p_rect, const Rect2& p_sr SWAP( texcoords[1], texcoords[2] ); SWAP( texcoords[0], texcoords[3] ); } - if (p_transpose) { - SWAP( texcoords[1], texcoords[3] ); - } Vector2 coords[4]= { Vector2( p_rect.pos.x, p_rect.pos.y ), |