diff --git a/src/Nazara/Renderer/Renderer.cpp b/src/Nazara/Renderer/Renderer.cpp index 0fc62e782..cead125a6 100644 --- a/src/Nazara/Renderer/Renderer.cpp +++ b/src/Nazara/Renderer/Renderer.cpp @@ -1786,15 +1786,15 @@ bool NzRenderer::EnsureStateUpdate() unsigned int offset; vertexDeclaration->GetComponent(static_cast(j), &enabled, &type, &offset); - if (!IsComponentTypeSupported(type)) - { - NazaraError("Invalid vertex declaration " + NzString::Pointer(vertexDeclaration) + ": Vertex component 0x" + NzString::Number(j, 16) + " (type: 0x" + NzString::Number(type, 16) + ") is not supported"); - updateFailed = true; - break; - } - if (enabled) { + if (!IsComponentTypeSupported(type)) + { + NazaraError("Invalid vertex declaration " + NzString::Pointer(vertexDeclaration) + ": Vertex component 0x" + NzString::Number(j, 16) + " (type: 0x" + NzString::Number(type, 16) + ") is not supported"); + updateFailed = true; + break; + } + glEnableVertexAttribArray(NzOpenGL::VertexComponentIndex[j]); switch (type)