diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-11-24 13:00:06 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-11-24 13:02:05 +0300 |
commit | 75b53542f2669d00caf2f98cfdbc9f1c91a6277f (patch) | |
tree | f782a1b143ad895440884f40203d06c43172e8c7 /source/blender/draw/engines/image | |
parent | 17770192fb0c5fddda709a37986c98b4cfcfb99b (diff) |
ImageEngine: Remove unneeded check for tiled image.
Regular images are also tiled images, but with a default tile that leads
to the same result.
Diffstat (limited to 'source/blender/draw/engines/image')
-rw-r--r-- | source/blender/draw/engines/image/image_drawing_mode.hh | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode.hh index d81b0971982..528e47b7a1e 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode.hh @@ -50,19 +50,13 @@ class DefaultDrawingMode : public AbstractDrawingMode { GPUBatch *geom = DRW_cache_quad_get(); - const bool is_tiled_texture = image && image->source == IMA_SRC_TILED; - if (is_tiled_texture) { - const float translate_x = image_mat[3][0]; - const float translate_y = image_mat[3][1]; - LISTBASE_FOREACH (ImageTile *, tile, &image->tiles) { - const int tile_x = ((tile->tile_number - 1001) % 10); - const int tile_y = ((tile->tile_number - 1001) / 10); - image_mat[3][0] = (float)tile_x + translate_x; - image_mat[3][1] = (float)tile_y + translate_y; - DRW_shgroup_call_obmat(grp, geom, image_mat); - } - } - else { + const float translate_x = image_mat[3][0]; + const float translate_y = image_mat[3][1]; + LISTBASE_FOREACH (ImageTile *, tile, &image->tiles) { + const int tile_x = ((tile->tile_number - 1001) % 10); + const int tile_y = ((tile->tile_number - 1001) / 10); + image_mat[3][0] = (float)tile_x + translate_x; + image_mat[3][1] = (float)tile_y + translate_y; DRW_shgroup_call_obmat(grp, geom, image_mat); } } |