small correction to BGE as recent commits broken normal mapping in the GE

This commit is contained in:
Michael Fox
2011-02-16 00:04:37 +00:00
parent b94be2aa14
commit c195e68e8e

View File

@@ -730,13 +730,13 @@ RAS_MeshObject* BL_ConvertMesh(Mesh* mesh, Object* blenderobj, KX_Scene* scene,
MFace *mface = dm->getFaceArray(dm); MFace *mface = dm->getFaceArray(dm);
MTFace *tface = static_cast<MTFace*>(dm->getFaceDataArray(dm, CD_MTFACE)); MTFace *tface = static_cast<MTFace*>(dm->getFaceDataArray(dm, CD_MTFACE));
MCol *mcol = static_cast<MCol*>(dm->getFaceDataArray(dm, CD_MCOL)); MCol *mcol = static_cast<MCol*>(dm->getFaceDataArray(dm, CD_MCOL));
float (*tangent)[3] = NULL; float (*tangent)[4] = NULL;
int totface = dm->getNumFaces(dm); int totface = dm->getNumFaces(dm);
const char *tfaceName = ""; const char *tfaceName = "";
if(tface) { if(tface) {
DM_add_tangent_layer(dm); DM_add_tangent_layer(dm);
tangent = (float(*)[3])dm->getFaceDataArray(dm, CD_TANGENT); tangent = (float(*)[4])dm->getFaceDataArray(dm, CD_TANGENT);
} }
meshobj = new RAS_MeshObject(mesh); meshobj = new RAS_MeshObject(mesh);