Merge branch 'master' into NDK-ShadowMapping

Former-commit-id: e2be28b65207dfbb81efe58f31ca31548afecee7
This commit is contained in:
Lynix
2016-04-17 19:57:15 +02:00
354 changed files with 24993 additions and 2830 deletions

View File

@@ -27,11 +27,15 @@ namespace Ndk
inline RenderSystem(const RenderSystem& renderSystem);
~RenderSystem() = default;
template<typename T> void ChangeRenderTechnique();
inline void ChangeRenderTechnique(std::unique_ptr<Nz::AbstractRenderTechnique>&& renderTechnique);
inline const Nz::BackgroundRef& GetDefaultBackground() const;
inline const Nz::Matrix4f& GetCoordinateSystemMatrix() const;
inline Nz::Vector3f GetGlobalForward() const;
inline Nz::Vector3f GetGlobalRight() const;
inline Nz::Vector3f GetGlobalUp() const;
inline Nz::AbstractRenderTechnique& GetRenderTechnique() const;
inline void SetDefaultBackground(Nz::BackgroundRef background);
inline void SetGlobalForward(const Nz::Vector3f& direction);
@@ -49,6 +53,7 @@ namespace Ndk
void UpdateDirectionalShadowMaps(const Nz::AbstractViewer& viewer);
void UpdatePointSpotShadowMaps();
std::unique_ptr<Nz::AbstractRenderTechnique> m_renderTechnique;
EntityList m_cameras;
EntityList m_drawables;
EntityList m_directionalLights;
@@ -56,7 +61,6 @@ namespace Ndk
EntityList m_pointSpotLights;
Nz::BackgroundRef m_background;
Nz::DepthRenderTechnique m_shadowTechnique;
Nz::ForwardRenderTechnique m_renderTechnique;
Nz::Matrix4f m_coordinateSystemMatrix;
Nz::RenderTexture m_shadowRT;
bool m_coordinateSystemInvalidated;

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);