forked from blender/blender
BLEN-365: Improve creation algorithm of PreviewEngine #21
@ -35,7 +35,7 @@ PreviewEngine *PreviewEngine::get_instance(RenderEngine *bl_engine, const std::s
|
|||||||
/* Unregister timer while PreviewEngine is working */
|
/* Unregister timer while PreviewEngine is working */
|
||||||
BLI_timer_unregister((uintptr_t)instance.get());
|
BLI_timer_unregister((uintptr_t)instance.get());
|
||||||
}
|
}
|
||||||
instance->update_bl_engine(bl_engine);
|
instance->update(bl_engine, render_delegate_id);
|
||||||
|
|
||||||
return instance.get();
|
return instance.get();
|
||||||
}
|
}
|
||||||
@ -117,9 +117,10 @@ void PreviewEngine::render(Depsgraph *depsgraph)
|
|||||||
update_render_result(layer_name, res[0], res[1], pixels);
|
update_render_result(layer_name, res[0], res[1], pixels);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewEngine::update_bl_engine(RenderEngine *bl_engine)
|
void PreviewEngine::update(RenderEngine *bl_engine, const std::string &render_delegate_id)
|
||||||
{
|
{
|
||||||
this->bl_engine = bl_engine;
|
this->bl_engine = bl_engine;
|
||||||
|
/* TODO: recreate render_delegate when render_delegate_id is changed */
|
||||||
}
|
}
|
||||||
|
|
||||||
void PreviewEngine::update_render_result(const std::string &layer_name,
|
void PreviewEngine::update_render_result(const std::string &layer_name,
|
||||||
|
@ -22,9 +22,9 @@ class PreviewEngine : public FinalEngine {
|
|||||||
bContext *context,
|
bContext *context,
|
||||||
pxr::HdRenderSettingsMap &render_settings) override;
|
pxr::HdRenderSettingsMap &render_settings) override;
|
||||||
void render(Depsgraph *depsgraph) override;
|
void render(Depsgraph *depsgraph) override;
|
||||||
void update_bl_engine(RenderEngine *bl_engine);
|
|
||||||
|
|
||||||
protected:
|
private:
|
||||||
|
void update(RenderEngine *bl_engine, const std::string &render_delegate_id);
|
||||||
void update_render_result(const std::string &layer_name,
|
void update_render_result(const std::string &layer_name,
|
||||||
int width,
|
int width,
|
||||||
int height,
|
int height,
|
||||||
|
Loading…
Reference in New Issue
Block a user