New function to check if running opengl render

This commit is contained in:
2018-02-16 16:52:08 +01:00
parent 18bb0bc569
commit c45f28ce95
2 changed files with 9 additions and 0 deletions

View File

@@ -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);

View File

@@ -3958,6 +3958,14 @@ bool DRW_state_is_scene_render(void)
return DST.options.is_scene_render;
}
/**
* 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.
*/