From d52be87fd5463108d3c28df2ce4110f312a5ae3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Fri, 22 Jan 2021 23:18:35 +0100 Subject: [PATCH] OpenGLRenderer: Fix Draw[Indexed]Data states --- src/Nazara/OpenGLRenderer/OpenGLCommandBuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nazara/OpenGLRenderer/OpenGLCommandBuffer.cpp b/src/Nazara/OpenGLRenderer/OpenGLCommandBuffer.cpp index b5ccbd0ed..3308adf01 100644 --- a/src/Nazara/OpenGLRenderer/OpenGLCommandBuffer.cpp +++ b/src/Nazara/OpenGLRenderer/OpenGLCommandBuffer.cpp @@ -80,12 +80,12 @@ namespace Nz } else if constexpr (std::is_same_v) { - ApplyStates(*context, m_currentStates); + ApplyStates(*context, command.states); context->glDrawArraysInstanced(GL_TRIANGLES, command.firstVertex, command.vertexCount, command.instanceCount); } else if constexpr (std::is_same_v) { - ApplyStates(*context, m_currentStates); + ApplyStates(*context, command.states); context->glDrawElementsInstanced(GL_TRIANGLES, command.indexCount, GL_UNSIGNED_SHORT, nullptr, command.instanceCount); } else if constexpr (std::is_same_v)