Blender  V3.3
Public Member Functions | Public Attributes | List of all members
blender::eevee::Instance Class Reference

A running instance of the engine. More...

#include <eevee_instance.hh>

Public Member Functions

 Instance ()
 
 ~Instance ()
 
bool is_viewport () const
 
bool overlays_enabled () const
 
bool use_scene_lights () const
 
bool use_studio_light () const
 
Interface
void render_frame (RenderLayer *render_layer, const char *view_name)
 
void draw_viewport (DefaultFramebufferList *dfbl)
 

Public Attributes

ShaderModuleshaders
 
SyncModule sync
 
MaterialModule materials
 
PipelineModule pipelines
 
VelocityModule velocity
 
Sampling sampling
 
Camera camera
 
Film film
 
RenderBuffers render_buffers
 
MainView main_view
 
World world
 
Depsgraphdepsgraph
 
Scenescene
 
ViewLayerview_layer
 
Objectcamera_eval_object
 
Objectcamera_orig_object
 
const RenderLayerrender_layer
 
RenderEnginerender
 
const DRWViewdrw_view
 
const View3Dv3d
 
const RegionView3Drv3d
 
bool gpencil_engine_enabled
 
std::string info = ""
 

Initialization

Initialization functions need to be called once at the start of a frame. Active camera, render extent and enabled render passes are immutable until next init. This takes care of resizing output buffers and view in case a parameter changed. IMPORTANT: xxx.init() functions are NOT meant to acquire and allocate DRW resources. Any attempt to do so will likely produce use after free situations.

void init (const int2 &output_res, const rcti *output_rect, RenderEngine *render, Depsgraph *depsgraph, const LightProbe *light_probe_=nullptr, Object *camera_object=nullptr, const RenderLayer *render_layer=nullptr, const DRWView *drw_view=nullptr, const View3D *v3d=nullptr, const RegionView3D *rv3d=nullptr)
 

Sync

Sync will gather data from the scene that can change over a time step (i.e: motion steps). IMPORTANT: xxx.sync() functions area responsible for creating DRW resources (i.e: DRWView) as well as querying temp texture pool. All DRWPasses should be ready by the end end_sync().

void begin_sync ()
 
void object_sync (Object *ob)
 
void end_sync ()
 
void render_sync ()
 

Detailed Description

A running instance of the engine.

Definition at line 35 of file eevee_instance.hh.

Constructor & Destructor Documentation

◆ Instance()

blender::eevee::Instance::Instance ( )
inline

Definition at line 73 of file eevee_instance.hh.

◆ ~Instance()

blender::eevee::Instance::~Instance ( )
inline

Definition at line 85 of file eevee_instance.hh.

Member Function Documentation

◆ begin_sync()

void blender::eevee::Instance::begin_sync ( )

◆ draw_viewport()

void blender::eevee::Instance::draw_viewport ( DefaultFramebufferList dfbl)

◆ end_sync()

void blender::eevee::Instance::end_sync ( )

◆ init()

void blender::eevee::Instance::init ( const int2 output_res,
const rcti output_rect,
RenderEngine render,
Depsgraph depsgraph,
const LightProbe light_probe_ = nullptr,
Object camera_object = nullptr,
const RenderLayer render_layer = nullptr,
const DRWView drw_view = nullptr,
const View3D v3d = nullptr,
const RegionView3D rv3d = nullptr 
)

◆ is_viewport()

bool blender::eevee::Instance::is_viewport ( ) const
inline

◆ object_sync()

void blender::eevee::Instance::object_sync ( Object ob)

◆ overlays_enabled()

bool blender::eevee::Instance::overlays_enabled ( ) const
inline

Definition at line 112 of file eevee_instance.hh.

References View3D::flag2, v3d, and V3D_HIDE_OVERLAYS.

Referenced by blender::eevee::Film::init().

◆ render_frame()

void blender::eevee::Instance::render_frame ( RenderLayer render_layer,
const char *  view_name 
)

◆ render_sync()

void blender::eevee::Instance::render_sync ( )

◆ use_scene_lights()

bool blender::eevee::Instance::use_scene_lights ( ) const
inline

◆ use_studio_light()

bool blender::eevee::Instance::use_studio_light ( ) const
inline

Member Data Documentation

◆ camera

Camera blender::eevee::Instance::camera

◆ camera_eval_object

Object* blender::eevee::Instance::camera_eval_object

Definition at line 56 of file eevee_instance.hh.

Referenced by blender::eevee::Camera::init(), and blender::eevee::Camera::sync().

◆ camera_orig_object

Object* blender::eevee::Instance::camera_orig_object

Definition at line 57 of file eevee_instance.hh.

Referenced by init().

◆ depsgraph

Depsgraph* blender::eevee::Instance::depsgraph

◆ drw_view

const DRWView* blender::eevee::Instance::drw_view

Only available when rendering for viewport.

Definition at line 62 of file eevee_instance.hh.

Referenced by blender::eevee::Camera::init(), init(), and blender::eevee::Camera::sync().

◆ film

Film blender::eevee::Instance::film

◆ gpencil_engine_enabled

bool blender::eevee::Instance::gpencil_engine_enabled

True if the grease pencil engine might be running.

Definition at line 67 of file eevee_instance.hh.

Referenced by begin_sync(), blender::eevee::Film::init(), and blender::eevee::SyncModule::sync_gpencil().

◆ info

std::string blender::eevee::Instance::info = ""

Definition at line 70 of file eevee_instance.hh.

Referenced by draw_viewport(), eevee_draw_scene(), and init().

◆ main_view

MainView blender::eevee::Instance::main_view

Definition at line 48 of file eevee_instance.hh.

Referenced by begin_sync(), and init().

◆ materials

MaterialModule blender::eevee::Instance::materials

◆ pipelines

PipelineModule blender::eevee::Instance::pipelines

◆ render

RenderEngine* blender::eevee::Instance::render

◆ render_buffers

RenderBuffers blender::eevee::Instance::render_buffers

◆ render_layer

const RenderLayer* blender::eevee::Instance::render_layer

Only available when rendering for final render.

Definition at line 59 of file eevee_instance.hh.

Referenced by init(), and render_frame().

◆ rv3d

const RegionView3D* blender::eevee::Instance::rv3d

Definition at line 64 of file eevee_instance.hh.

Referenced by init().

◆ sampling

Sampling blender::eevee::Instance::sampling

◆ scene

Scene* blender::eevee::Instance::scene

◆ shaders

ShaderModule& blender::eevee::Instance::shaders

Definition at line 39 of file eevee_instance.hh.

Referenced by blender::eevee::Film::sync(), and blender::eevee::World::sync().

◆ sync

SyncModule blender::eevee::Instance::sync

Definition at line 40 of file eevee_instance.hh.

Referenced by object_sync(), and blender::eevee::World::sync().

◆ v3d

const View3D* blender::eevee::Instance::v3d

◆ velocity

VelocityModule blender::eevee::Instance::velocity

◆ view_layer

ViewLayer* blender::eevee::Instance::view_layer

Definition at line 55 of file eevee_instance.hh.

Referenced by blender::eevee::Film::init().

◆ world

World blender::eevee::Instance::world

Definition at line 49 of file eevee_instance.hh.

Referenced by begin_sync().


The documentation for this class was generated from the following files: