diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-11-24 13:23:44 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-11-24 13:23:44 +0300 |
commit | 98a5658239bb61a701f20309c741ab895ed92b7a (patch) | |
tree | 9daccacba9ea33307ddae73575bc787570ff5cd1 /source/blender/draw/engines/image | |
parent | 75b53542f2669d00caf2f98cfdbc9f1c91a6277f (diff) |
Cleanup: Renamed DefaultDrawingMode ImageSpaceDrawingMode.
Explains more what it does, not how it is used.
Diffstat (limited to 'source/blender/draw/engines/image')
-rw-r--r-- | source/blender/draw/engines/image/image_drawing_mode_image_space.hh (renamed from source/blender/draw/engines/image/image_drawing_mode.hh) | 2 | ||||
-rw-r--r-- | source/blender/draw/engines/image/image_engine.cc | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/draw/engines/image/image_drawing_mode.hh b/source/blender/draw/engines/image/image_drawing_mode_image_space.hh index 528e47b7a1e..26f4bc28106 100644 --- a/source/blender/draw/engines/image/image_drawing_mode.hh +++ b/source/blender/draw/engines/image/image_drawing_mode_image_space.hh @@ -26,7 +26,7 @@ namespace blender::draw::image_engine { -class DefaultDrawingMode : public AbstractDrawingMode { +class ImageSpaceDrawingMode : public AbstractDrawingMode { private: DRWPass *create_image_pass() const { diff --git a/source/blender/draw/engines/image/image_engine.cc b/source/blender/draw/engines/image/image_engine.cc index 491fbec978b..37db7246e67 100644 --- a/source/blender/draw/engines/image/image_engine.cc +++ b/source/blender/draw/engines/image/image_engine.cc @@ -41,7 +41,7 @@ #include "GPU_batch.h" -#include "image_drawing_mode.hh" +#include "image_drawing_mode_image_space.hh" #include "image_engine.h" #include "image_private.hh" #include "image_space_image.hh" @@ -63,12 +63,18 @@ static std::unique_ptr<AbstractSpaceAccessor> space_accessor_from_context( return nullptr; } +template< + /** \brief Drawing mode to use. + * + * Useful during development to switch between drawing implementations. + */ + typename DrawingMode = ImageSpaceDrawingMode> class ImageEngine { private: const DRWContextState *draw_ctx; IMAGE_Data *vedata; std::unique_ptr<AbstractSpaceAccessor> space; - DefaultDrawingMode drawing_mode; + DrawingMode drawing_mode; public: ImageEngine(const DRWContextState *draw_ctx, IMAGE_Data *vedata) |