diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2013-03-22 01:10:14 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2013-03-22 01:10:14 +0400 |
commit | 6d8b3d2d948ccb7c9f053e10981d1b7b1f3cf286 (patch) | |
tree | a2dbf348807436150f64f005a36f01f51c439319 | |
parent | b57fc113aa12134e19ff721a52614aed51d0bda5 (diff) |
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)
-rw-r--r-- | source/gameengine/Converter/BL_BlenderDataConversion.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp index 6262f8e48ce..d90708602d5 100644 --- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp +++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp @@ -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 */ |