Fixed Renderer testing non-enabled vertex components
Former-commit-id: d624d98b7b8a61fc3dc92d4c10441e759a50f310
This commit is contained in:
parent
f154dbfb31
commit
0d69da09b9
|
|
@ -1786,15 +1786,15 @@ bool NzRenderer::EnsureStateUpdate()
|
|||
unsigned int offset;
|
||||
vertexDeclaration->GetComponent(static_cast<nzVertexComponent>(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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue