diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2018-02-16 18:52:08 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2018-02-16 18:52:27 +0300 |
commit | c45f28ce9510fead1dcd216bb2e667a20cea5a28 (patch) | |
tree | a5261a0407acd0a0a47fd3f4da12ac719c6aaeec /source/blender | |
parent | 18bb0bc5693927f0e7393f717fdb7d844d4cd69d (diff) |
New function to check if running opengl render
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/intern/DRW_render.h | 1 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 49f244d4268..811e807af67 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -466,6 +466,7 @@ bool DRW_state_is_select(void); bool DRW_state_is_depth(void); bool DRW_state_is_image_render(void); bool DRW_state_is_scene_render(void); +bool DRW_state_is_opengl_render(void); bool DRW_state_show_text(void); bool DRW_state_draw_support(void); bool DRW_state_draw_background(void); diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index c0498419127..f60d10faa4f 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -3959,6 +3959,14 @@ bool DRW_state_is_scene_render(void) } /** +* Whether we are rendering simple opengl render +*/ +bool DRW_state_is_opengl_render(void) +{ + return DST.options.is_image_render && !DST.options.is_scene_render; +} + +/** * Gives you the iterator mode to use for depsgraph. */ eDepsObjectIteratorMode DRW_iterator_mode_get(void) |