Fix load with DTS shapes introduced with HW skinning changes

This commit is contained in:
James Urquhart 2016-08-30 19:07:02 +01:00
parent 26241020ff
commit 12019173af
5 changed files with 85 additions and 18 deletions

View file

@ -169,6 +169,7 @@ void TSShapeInstance::buildInstanceData(TSShape * _shape, bool loadMaterials)
// material list...
mMaterialList = NULL;
mOwnMaterialList = false;
mUseOwnBuffer = false;
//
mData = 0;
@ -532,7 +533,7 @@ void TSShapeInstance::render( const TSRenderState &rdata, S32 dl, F32 intraDL )
S32 end = rdata.isNoRenderTranslucent() ? mShape->subShapeFirstTranslucentObject[ss] : mShape->subShapeFirstObject[ss] + mShape->subShapeNumObjects[ss];
TSVertexBufferHandle *realBuffer;
if (TSShape::smUseHardwareSkinning)
if (TSShape::smUseHardwareSkinning && !mUseOwnBuffer)
{
// For hardware skinning, just using the buffer associated with the shape will work fine
realBuffer = &mShape->mShapeVertexBuffer;
@ -893,3 +894,7 @@ bool TSShapeInstance::hasAccumulation()
return result;
}
void TSShapeInstance::setUseOwnBuffer()
{
mUseOwnBuffer = true;
}