diff options
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_instance.hh')
-rw-r--r-- | source/blender/draw/engines/eevee_next/eevee_instance.hh | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_instance.hh b/source/blender/draw/engines/eevee_next/eevee_instance.hh index 84be59fc5f0..f47d4f20363 100644 --- a/source/blender/draw/engines/eevee_next/eevee_instance.hh +++ b/source/blender/draw/engines/eevee_next/eevee_instance.hh @@ -16,8 +16,11 @@ #include "DRW_render.h" #include "eevee_camera.hh" +#include "eevee_film.hh" #include "eevee_material.hh" #include "eevee_pipeline.hh" +#include "eevee_renderbuffers.hh" +#include "eevee_sampling.hh" #include "eevee_shader.hh" #include "eevee_sync.hh" #include "eevee_view.hh" @@ -38,7 +41,10 @@ class Instance { MaterialModule materials; PipelineModule pipelines; VelocityModule velocity; + Sampling sampling; Camera camera; + Film film; + RenderBuffers render_buffers; MainView main_view; World world; @@ -57,6 +63,9 @@ class Instance { const View3D *v3d; const RegionView3D *rv3d; + /** True if the grease pencil engine might be running. */ + bool gpencil_engine_enabled; + /* Info string displayed at the top of the render / viewport. */ std::string info = ""; @@ -67,7 +76,10 @@ class Instance { materials(*this), pipelines(*this), velocity(*this), + sampling(*this), camera(*this), + film(*this), + render_buffers(*this), main_view(*this), world(*this){}; ~Instance(){}; @@ -92,12 +104,17 @@ class Instance { void draw_viewport(DefaultFramebufferList *dfbl); - bool is_viewport(void) + bool is_viewport() const + { + return render == nullptr; + } + + bool overlays_enabled() const { - return !DRW_state_is_scene_render(); + return (!v3d) || ((v3d->flag & V3D_HIDE_OVERLAYS) == 0); } - bool use_scene_lights(void) const + bool use_scene_lights() const { return (!v3d) || ((v3d->shading.type == OB_MATERIAL) && @@ -107,7 +124,7 @@ class Instance { } /* Light the scene using the selected HDRI in the viewport shading pop-over. */ - bool use_studio_light(void) const + bool use_studio_light() const { return (v3d) && (((v3d->shading.type == OB_MATERIAL) && ((v3d->shading.flag & V3D_SHADING_SCENE_WORLD) == 0)) || @@ -116,6 +133,10 @@ class Instance { } private: + static void object_sync_render(void *instance_, + Object *ob, + RenderEngine *engine, + Depsgraph *depsgraph); void render_sample(); void mesh_sync(Object *ob, ObjectHandle &ob_handle); |