Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-02-23 08:49:46 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-02-23 08:49:46 +0400
commite42e570ff41eb348dc7e496567038265b8468925 (patch)
tree0b014a149881e083077bdf49f8e22d1ac4469a88 /source/gameengine/Converter
parent87ab62246333171ee11b43e348eab5f5b764f52f (diff)
BGE: fix for uninitialized tangents
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r--source/gameengine/Converter/BL_BlenderDataConversion.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gameengine/Converter/BL_BlenderDataConversion.cpp b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
index 7387092391d..a4c7e8b0fa7 100644
--- a/source/gameengine/Converter/BL_BlenderDataConversion.cpp
+++ b/source/gameengine/Converter/BL_BlenderDataConversion.cpp
@@ -1129,6 +1129,16 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
MT_Vector3 no[4];
MT_Vector4 tan[4];
+ /* ugh, if there is a less annoying way to do this please use that.
+ * since these are converted from floats to floats, theres no real
+ * advantage to use MT_ types - campbell */
+ for (unsigned int i = 0; i < 4; i++) {
+ const float zero_vec[4] = {0.0f};
+ pt[i].setValue(zero_vec);
+ no[i].setValue(zero_vec);
+ tan[i].setValue(zero_vec);
+ }
+
for (int f=0;f<totface;f++,mface++)
{
/* get coordinates, normals and tangents */