remove bone component cache to decrease memory consumption
caching this is entirely unnecessary, as it changes every frame
This commit is contained in:
parent
6ea1b68a1c
commit
3d2f9e06ed
22 changed files with 79 additions and 113 deletions
|
|
@ -138,18 +138,15 @@ void FHWModelRenderer::DrawElements(int numIndices, size_t offset)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
int FHWModelRenderer::SetupFrame(FModel *model, unsigned int frame1, unsigned int frame2, unsigned int size, const TArray<VSMatrix>& bones, int boneStartIndex)
|
||||
void FHWModelRenderer::SetupFrame(FModel *model, unsigned int frame1, unsigned int frame2, unsigned int size, int boneStartIndex)
|
||||
{
|
||||
auto mdbuff = static_cast<FModelVertexBuffer*>(model->GetVertexBuffer(GetType()));
|
||||
screen->mBones->Map();
|
||||
boneIndexBase = boneStartIndex >= 0 ? boneStartIndex : screen->mBones->UploadBones(bones);
|
||||
screen->mBones->Unmap();
|
||||
state.SetBoneIndexBase(boneIndexBase);
|
||||
//boneIndexBase = boneStartIndex;//boneStartIndex >= 0 ? boneStartIndex : screen->mBones->UploadBones(bones);
|
||||
state.SetBoneIndexBase(boneStartIndex);
|
||||
if (mdbuff)
|
||||
{
|
||||
state.SetVertexBuffer(mdbuff->vertexBuffer(), frame1, frame2);
|
||||
if (mdbuff->indexBuffer()) state.SetIndexBuffer(mdbuff->indexBuffer());
|
||||
}
|
||||
return boneIndexBase;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue