diff --git a/include/Nazara/Graphics/ForwardRenderQueue.hpp b/include/Nazara/Graphics/ForwardRenderQueue.hpp index 6a945658a..65bc8a13f 100644 --- a/include/Nazara/Graphics/ForwardRenderQueue.hpp +++ b/include/Nazara/Graphics/ForwardRenderQueue.hpp @@ -81,7 +81,6 @@ class NAZARA_API NzForwardRenderQueue : public NzAbstractRenderQueue, NzResource typedef std::map, StaticMeshComparator> StaticMeshContainer; typedef std::map, MaterialComparator> MeshContainer; - std::map, MaterialComparator> billboards; MeshContainer opaqueModels; std::vector> transparentsModels; std::vector transparentSkeletalModels; diff --git a/src/Nazara/Graphics/ForwardRenderTechnique.cpp b/src/Nazara/Graphics/ForwardRenderTechnique.cpp index 8288a449c..2bf277f62 100644 --- a/src/Nazara/Graphics/ForwardRenderTechnique.cpp +++ b/src/Nazara/Graphics/ForwardRenderTechnique.cpp @@ -56,14 +56,14 @@ void NzForwardRenderTechnique::Draw(const NzScene* scene) int lightCountLocation = -1; // Rendu des modèles opaques - for (auto& matIt : m_renderQueue.visibleModels) + for (auto& matIt : m_renderQueue.opaqueModels) { NzForwardRenderQueue::SkeletalMeshContainer& skeletalContainer = matIt.second.first; NzForwardRenderQueue::StaticMeshContainer& staticContainer = matIt.second.second; if (!skeletalContainer.empty() || !staticContainer.empty()) { - NzMaterial* material = matIt.first; + const NzMaterial* material = matIt.first; // On commence par récupérer le shader du matériau const NzShader* shader; @@ -115,7 +115,7 @@ void NzForwardRenderTechnique::Draw(const NzScene* scene) // Meshs statiques for (auto& subMeshIt : staticContainer) { - NzStaticMesh* mesh = subMeshIt.first; + const NzStaticMesh* mesh = subMeshIt.first; std::vector& matrices = subMeshIt.second; if (!matrices.empty()) { @@ -146,14 +146,14 @@ void NzForwardRenderTechnique::Draw(const NzScene* scene) ///TODO: LightManager ? if (lightCountLocation != -1) { - std::vector& visibleLights = m_renderQueue.visibleLights; + std::vector& lights = m_renderQueue.lights; lightComparator.pos = matrix.GetTranslation(); - std::sort(visibleLights.begin(), visibleLights.end(), lightComparator); + std::sort(lights.begin(), lights.end(), lightComparator); - unsigned int max = std::min(std::min(NAZARA_RENDERER_SHADER_MAX_LIGHTCOUNT - lightCount, m_maxLightsPerObject), static_cast(visibleLights.size())); + unsigned int max = std::min(std::min(NAZARA_RENDERER_SHADER_MAX_LIGHTCOUNT - lightCount, m_maxLightsPerObject), static_cast(lights.size())); for (unsigned int i = 0; i < max; ++i) - visibleLights[i]->Apply(shader, lightCount++); + lights[i]->Apply(shader, lightCount++); shader->SendInteger(lightCountLocation, lightCount); } @@ -167,7 +167,7 @@ void NzForwardRenderTechnique::Draw(const NzScene* scene) } } - for (const std::pair& pair : m_renderQueue.visibleTransparentsModels) + for (const std::pair& pair : m_renderQueue.transparentsModels) { // Matériau NzMaterial* material = (pair.second) ? @@ -244,14 +244,14 @@ void NzForwardRenderTechnique::Draw(const NzScene* scene) ///TODO: LightManager ? if (lightCountLocation != -1) { - std::vector& visibleLights = m_renderQueue.visibleLights; + std::vector& lights = m_renderQueue.lights; lightComparator.pos = matrix.GetTranslation(); - std::sort(visibleLights.begin(), visibleLights.end(), lightComparator); + std::sort(lights.begin(), lights.end(), lightComparator); - unsigned int max = std::min(std::min(NAZARA_RENDERER_SHADER_MAX_LIGHTCOUNT - lightCount, m_maxLightsPerObject), static_cast(visibleLights.size())); + unsigned int max = std::min(std::min(NAZARA_RENDERER_SHADER_MAX_LIGHTCOUNT - lightCount, m_maxLightsPerObject), static_cast(lights.size())); for (unsigned int i = 0; i < max; ++i) - visibleLights[i]->Apply(shader, lightCount++); + lights[i]->Apply(shader, lightCount++); shader->SendInteger(lightCountLocation, lightCount); } diff --git a/src/Nazara/Renderer/Renderer.cpp b/src/Nazara/Renderer/Renderer.cpp index dc35b40a9..bd67a2ac2 100644 --- a/src/Nazara/Renderer/Renderer.cpp +++ b/src/Nazara/Renderer/Renderer.cpp @@ -1271,7 +1271,7 @@ bool NzRenderer::EnsureStateUpdate() location = shaderImpl->GetUniformLocation(nzShaderUniform_TargetSize); if (location != -1) - shaderImpl->SendVector(location, 1.f/NzVector2f(s_targetSize)); + shaderImpl->SendVector(location, NzVector2f(s_targetSize)); s_uniformTargetSizeUpdated = true; }