Sdk/RenderSystem: Allow to change render technique

Former-commit-id: ec61a2ebff138300344e6068917f0863c3d11859
This commit is contained in:
Lynix
2016-04-16 18:40:58 +02:00
parent 104e393d65
commit c8dd28f75c
8 changed files with 43 additions and 10 deletions

View File

@@ -9,6 +9,17 @@ namespace Ndk
{
}
template<typename T>
inline void RenderSystem::ChangeRenderTechnique()
{
ChangeRenderTechnique(std::make_unique<T>());
}
inline void RenderSystem::ChangeRenderTechnique(std::unique_ptr<Nz::AbstractRenderTechnique>&& renderTechnique)
{
m_renderTechnique = std::move(renderTechnique);
}
inline const Nz::BackgroundRef& RenderSystem::GetDefaultBackground() const
{
return m_background;
@@ -34,6 +45,11 @@ namespace Ndk
return Nz::Vector3f(m_coordinateSystemMatrix.m12, m_coordinateSystemMatrix.m22, m_coordinateSystemMatrix.m32);
}
inline Nz::AbstractRenderTechnique& RenderSystem::GetRenderTechnique() const
{
return *m_renderTechnique.get();
}
inline void RenderSystem::SetDefaultBackground(Nz::BackgroundRef background)
{
m_background = std::move(background);