Do not draw instanced first mesh if vertex type is wrong

This commit is contained in:
Vincent Lejeune 2014-11-16 01:50:55 +01:00
parent 1253893043
commit 2016fc2ab2

View File

@ -447,8 +447,11 @@ void renderInstancedMeshes1stPass(Args...args)
GLMesh *mesh = meshes[i];
#ifdef DEBUG
if (mesh->VAOType != T::VertexType)
{
Log::error("RenderGeometry", "Wrong instanced vertex format (hint : %s)",
mesh->textures[0]->getName().getPath().c_str());
mesh->textures[0]->getName().getPath().c_str());
continue;
}
#endif
TexExpander<typename T::InstancedFirstPassShader>::template ExpandTex(*mesh, T::FirstPassTextures);