diff --git a/src/Nazara/Graphics/DeferredRenderQueue.cpp b/src/Nazara/Graphics/DeferredRenderQueue.cpp index 8623904a6..7d214b217 100644 --- a/src/Nazara/Graphics/DeferredRenderQueue.cpp +++ b/src/Nazara/Graphics/DeferredRenderQueue.cpp @@ -239,6 +239,8 @@ namespace Nz std::vector& instances = it2->second.instances; instances.push_back(transformMatrix); + + materialEntry.maxInstanceCount = std::max(materialEntry.maxInstanceCount, instances.size()); } } diff --git a/src/Nazara/Renderer/RenderTexture.cpp b/src/Nazara/Renderer/RenderTexture.cpp index c6e78df86..647b8ff91 100644 --- a/src/Nazara/Renderer/RenderTexture.cpp +++ b/src/Nazara/Renderer/RenderTexture.cpp @@ -588,7 +588,7 @@ namespace Nz std::memcpy(&m_impl->colorTargets[0], targets, targetCount*sizeof(UInt8)); m_impl->userDefinedTargets = true; - InvalidateDrawBuffers(); + InvalidateTargets(); } void RenderTexture::SetColorTargets(const std::initializer_list& targets) const @@ -614,7 +614,7 @@ namespace Nz *ptr++ = index; m_impl->userDefinedTargets = true; - InvalidateDrawBuffers(); + InvalidateTargets(); } void RenderTexture::Unlock() const