Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2021-11-24 13:00:06 +0300
committerJeroen Bakker <jeroen@blender.org>2021-11-24 13:02:05 +0300
commit75b53542f2669d00caf2f98cfdbc9f1c91a6277f (patch)
treef782a1b143ad895440884f40203d06c43172e8c7 /source
parent17770192fb0c5fddda709a37986c98b4cfcfb99b (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')
-rw-r--r--source/blender/draw/engines/image/image_drawing_mode.hh20
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);
}
}