{
public:
bool root:1, viewSpace:1, ownMesh:1, translucent:1, flipWindings:1, keysLoaded:1, transform:1, mesh:1, light:1, camera:1, localMatrixSet:1;
+ bool computeLightVectors:1;
int hierarchy:16:16;
};
{
nVertices += child.mesh.nVertices;
flags |= child.mesh.flags;
+ this.flags.computeLightVectors |= child.flags.computeLightVectors;
}
}
int nNewVertices;
Vector3Df * mVertices;
double cutOff = cos(Degrees { SMOOTH_CUTOFF });
+ bool hasBumpMap = false;
Map<SharedSourceVertexInfo, SharedDestVertexInfo> sharedVertices { };
Map<SourceVertexInfo, DestVertexInfo> vertexMap { };
{
Face * face = &faces[c];
int i;
+ if(face->material && face->material.bumpMap)
+ hasBumpMap = true;
// Zero space points
if(!mVertices[face->indices[0]].OnCompare(mVertices[face->indices[1]]) &&
}
mesh.Unlock({ normals = true, tangents = true });
+ object.flags.computeLightVectors = hasBumpMap;
// Free all the temporary stuff
displaySystem.driver.PushMatrix(this);
#if ENABLE_GL_FFP
- if(object.mesh.tangents && object.mesh.normals)
+ if(object.mesh.tangents && object.mesh.normals && object.flags.computeLightVectors)
{
Mesh mesh = object.mesh;
if(!glCaps_shaders)