New function to check if running opengl render
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user