Merge remote-tracking branch 'origin/NDK' into NDK-ShadowMapping
Conflicts: SDK/include/NDK/Systems/RenderSystem.hpp SDK/src/NDK/Systems/RenderSystem.cpp Former-commit-id: f62e9a27427d96893acd2381bb06ae928a1d3741
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
||||
|
||||
#include <Nazara/Core/Error.hpp>
|
||||
#include <Nazara/Math/Algorithm.hpp>
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
@@ -130,7 +131,7 @@ namespace Ndk
|
||||
|
||||
inline void CameraComponent::SetFOV(float fov)
|
||||
{
|
||||
NazaraAssert(fov != 0.f, "FOV must be different from zero");
|
||||
NazaraAssert(!NzNumberEquals(fov, 0.f), "FOV must be different from zero");
|
||||
|
||||
m_fov = fov;
|
||||
InvalidateProjectionMatrix();
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#ifndef NDK_SYSTEMS_RENDERSYSTEM_HPP
|
||||
#define NDK_SYSTEMS_RENDERSYSTEM_HPP
|
||||
|
||||
#include <Nazara/Graphics/AbstractBackground.hpp>
|
||||
#include <Nazara/Graphics/DepthRenderTechnique.hpp>
|
||||
#include <Nazara/Graphics/ForwardRenderTechnique.hpp>
|
||||
#include <Nazara/Renderer/RenderTexture.hpp>
|
||||
@@ -26,6 +27,10 @@ namespace Ndk
|
||||
inline RenderSystem(const RenderSystem& renderSystem);
|
||||
~RenderSystem() = default;
|
||||
|
||||
inline const NzBackgroundRef& GetDefaultBackground() const;
|
||||
|
||||
inline void SetDefaultBackground(NzBackgroundRef background);
|
||||
|
||||
static SystemIndex systemIndex;
|
||||
|
||||
private:
|
||||
@@ -37,6 +42,7 @@ namespace Ndk
|
||||
EntityList m_cameras;
|
||||
EntityList m_drawables;
|
||||
EntityList m_lights;
|
||||
NzBackgroundRef m_background;
|
||||
NzDepthRenderTechnique m_shadowTechnique;
|
||||
NzForwardRenderTechnique m_renderTechnique;
|
||||
NzRenderTexture m_shadowRT;
|
||||
|
||||
@@ -8,4 +8,14 @@ namespace Ndk
|
||||
System(renderSystem)
|
||||
{
|
||||
}
|
||||
|
||||
inline const NzBackgroundRef& RenderSystem::GetDefaultBackground() const
|
||||
{
|
||||
return m_background;
|
||||
}
|
||||
|
||||
inline void RenderSystem::SetDefaultBackground(NzBackgroundRef background)
|
||||
{
|
||||
m_background = std::move(background);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user