Because the lines which originally took care of that are commented out, I am unsure if this behavior is correct.
In my own branch I decided the behavior is incorrect and wrote:
Code: Select all
SubEntity::SubEntity (Entity* parent, SubMesh* subMeshBasis)
: Renderable(), mParentEntity(parent), //mMaterialName("BaseWhite"),
mSubMesh(subMeshBasis), mCachedCamera(0)
{
//mMaterialPtr = MaterialManager::getSingleton().getByName(mMaterialName, subMeshBasis->parent->getGroup());
mMaterialLodIndex = 0;
mVisible = true;
mRenderQueueID = 0;
mRenderQueueIDSet = false;
mRenderQueuePrioritySet = false;
mSkelAnimVertexData = 0;
mVertexAnimationAppliedThisFrame = false;
mSoftwareVertexAnimVertexData = 0;
mHardwareVertexAnimVertexData = 0;
mHardwarePoseCount = 0;
mIndexStart = 0;
mIndexEnd = 0;
setMaterialName("BaseWhite"); // <--- Added line
}
Twiggler