diff --git a/SDK/include/NDK/Components/CameraComponent.inl b/SDK/include/NDK/Components/CameraComponent.inl index 37f13d9c4..6a6eb3084 100644 --- a/SDK/include/NDK/Components/CameraComponent.inl +++ b/SDK/include/NDK/Components/CameraComponent.inl @@ -3,6 +3,7 @@ // For conditions of distribution and use, see copyright notice in Prerequesites.hpp #include +#include 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(); diff --git a/SDK/src/NDK/Systems/RenderSystem.cpp b/SDK/src/NDK/Systems/RenderSystem.cpp index db04d511d..c70bd5574 100644 --- a/SDK/src/NDK/Systems/RenderSystem.cpp +++ b/SDK/src/NDK/Systems/RenderSystem.cpp @@ -26,6 +26,8 @@ namespace Ndk void RenderSystem::OnEntityValidation(Entity* entity, bool justAdded) { + NazaraUnused(justAdded); + if (entity->HasComponent() && entity->HasComponent()) { m_cameras.Insert(entity); @@ -50,6 +52,8 @@ namespace Ndk void RenderSystem::OnUpdate(float elapsedTime) { + NazaraUnused(elapsedTime); + for (const Ndk::EntityHandle& camera : m_cameras) { CameraComponent& camComponent = camera->GetComponent(); diff --git a/include/Nazara/Graphics/ForwardRenderTechnique.inl b/include/Nazara/Graphics/ForwardRenderTechnique.inl index 888c0d0fa..8d4d8736b 100644 --- a/include/Nazara/Graphics/ForwardRenderTechnique.inl +++ b/include/Nazara/Graphics/ForwardRenderTechnique.inl @@ -52,6 +52,9 @@ inline void NzForwardRenderTechnique::SendLightUniforms(const NzShader* shader, inline float NzForwardRenderTechnique::ComputeDirectionalLightScore(const NzSpheref& object, const NzAbstractRenderQueue::DirectionalLight& light) { + NazaraUnused(object); + NazaraUnused(light); + ///TODO: Compute a score depending on the light luminosity return 0.f; } @@ -70,6 +73,9 @@ inline float NzForwardRenderTechnique::ComputeSpotLightScore(const NzSpheref& ob inline bool NzForwardRenderTechnique::IsDirectionalLightSuitable(const NzSpheref& object, const NzAbstractRenderQueue::DirectionalLight& light) { + NazaraUnused(object); + NazaraUnused(light); + // Directional light are always suitables return true; } diff --git a/include/Nazara/Graphics/InstancedRenderable.inl b/include/Nazara/Graphics/InstancedRenderable.inl index be49fa49c..6023e684c 100644 --- a/include/Nazara/Graphics/InstancedRenderable.inl +++ b/include/Nazara/Graphics/InstancedRenderable.inl @@ -3,6 +3,7 @@ // For conditions of distribution and use, see copyright notice in Config.hpp inline NzInstancedRenderable::NzInstancedRenderable(const NzInstancedRenderable& renderable) : +NzRefCounted(), m_boundingVolume(renderable.m_boundingVolume), m_boundingVolumeUpdated(renderable.m_boundingVolumeUpdated) { diff --git a/src/Nazara/Graphics/AbstractRenderQueue.cpp b/src/Nazara/Graphics/AbstractRenderQueue.cpp index 5b24d0946..df86300f0 100644 --- a/src/Nazara/Graphics/AbstractRenderQueue.cpp +++ b/src/Nazara/Graphics/AbstractRenderQueue.cpp @@ -24,6 +24,8 @@ void NzAbstractRenderQueue::AddSpotLight(const SpotLight& light) void NzAbstractRenderQueue::Clear(bool fully) { + NazaraUnused(fully); + directionalLights.clear(); pointLights.clear(); spotLights.clear(); diff --git a/src/Nazara/Physics/PhysObject.cpp b/src/Nazara/Physics/PhysObject.cpp index b33acb226..a0d1dd164 100644 --- a/src/Nazara/Physics/PhysObject.cpp +++ b/src/Nazara/Physics/PhysObject.cpp @@ -52,10 +52,10 @@ m_mass(0.f) NzPhysObject::NzPhysObject(NzPhysObject&& object) : m_matrix(std::move(object.m_matrix)), +m_geom(std::move(object.m_geom)), m_forceAccumulator(std::move(object.m_forceAccumulator)), m_torqueAccumulator(std::move(object.m_torqueAccumulator)), m_body(object.m_body), -m_geom(std::move(object.m_geom)), m_world(object.m_world), m_gravityFactor(object.m_gravityFactor), m_mass(object.m_mass) diff --git a/src/Nazara/Renderer/RenderWindow.cpp b/src/Nazara/Renderer/RenderWindow.cpp index 97eb793d4..9d69ad312 100644 --- a/src/Nazara/Renderer/RenderWindow.cpp +++ b/src/Nazara/Renderer/RenderWindow.cpp @@ -41,7 +41,7 @@ bool NzRenderWindow::CopyToImage(NzAbstractImage* image, const NzVector3ui& dstP } #endif - return CopyToImage(image, NzRectui(NzVector2ui(0U), GetSize())); + return CopyToImage(image, NzRectui(NzVector2ui(0U), GetSize()), dstPos); } bool NzRenderWindow::CopyToImage(NzAbstractImage* image, const NzRectui& rect, const NzVector3ui& dstPos) const diff --git a/src/Nazara/Utility/Formats/OBJParser.cpp b/src/Nazara/Utility/Formats/OBJParser.cpp index cb435e53c..439c41bd4 100644 --- a/src/Nazara/Utility/Formats/OBJParser.cpp +++ b/src/Nazara/Utility/Formats/OBJParser.cpp @@ -104,12 +104,12 @@ bool NzOBJParser::Parse() std::unordered_map> meshes; unsigned int matIndex = 0; - auto GetMaterial = [&meshes, &matIndex] (const NzString& meshName, const NzString& matName) -> FaceVec* + auto GetMaterial = [&meshes, &matIndex] (const NzString& mesh, const NzString& material) -> FaceVec* { - auto& map = meshes[meshName]; - auto it = map.find(matName); + auto& map = meshes[mesh]; + auto it = map.find(material); if (it == map.end()) - it = map.insert(std::make_pair(matName, MatPair(FaceVec(), matIndex++))).first; + it = map.insert(std::make_pair(material, MatPair(FaceVec(), matIndex++))).first; return &(it->second.first); };