BGE bugfix: [#34550] getVertexArrayLength changed in 2.66

This bug was producing way more geometry than we need. Potentially
memory saver (or performance even) bugfix.

Bottomline is:
We need to initialize the UVs otherwise vertex comparison fails ...
Ideally MoTo should take care of initializing MT_Point2
(note in Windows that seems to be fine, but it's safer to not rely on that)
This commit is contained in:
Dalai Felinto 2013-03-21 21:10:14 +00:00
parent b57fc113aa
commit 6d8b3d2d94

@ -1137,6 +1137,11 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
tan[i].setValue(zero_vec);
}
/* we need to manually initialize the uvs (MoTo doesn't do that) [#34550] */
for (unsigned int i = 0; i < RAS_TexVert::MAX_UNIT; i++) {
uvs[0][i] = uvs[1][i] = uvs[2][i] = uvs[3][i] = MT_Point2(0.f, 0.f);
}
for (int f=0;f<totface;f++,mface++)
{
/* get coordinates, normals and tangents */