Remove bone component cache, VKDoom Edition
This commit is contained in:
parent
aba5cbf768
commit
87bda3d8d4
21 changed files with 80 additions and 113 deletions
|
|
@ -169,16 +169,19 @@ 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)
|
||||
int FHWModelRenderer::UploadBones(const TArray<VSMatrix>& bones)
|
||||
{
|
||||
return state.UploadBones(bones);
|
||||
}
|
||||
|
||||
void FHWModelRenderer::SetupFrame(FModel *model, unsigned int frame1, unsigned int frame2, unsigned int size, int boneStartIndex)
|
||||
{
|
||||
auto mdbuff = static_cast<FModelVertexBuffer*>(model->GetVertexBuffer(GetType()));
|
||||
boneIndexBase = boneStartIndex >= 0 ? boneStartIndex : state.UploadBones(bones);
|
||||
state.SetBoneIndexBase(boneIndexBase);
|
||||
state.SetBoneIndexBase(boneStartIndex);
|
||||
if (mdbuff)
|
||||
{
|
||||
state.SetVertexBuffer(mdbuff->vertexBuffer(), frame1, frame2);
|
||||
if (mdbuff->indexBuffer()) state.SetIndexBuffer(mdbuff->indexBuffer());
|
||||
}
|
||||
return boneIndexBase;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,7 +59,8 @@ public:
|
|||
void SetMaterial(FGameTexture *skin, bool clampNoFilter, FTranslationID translation, void * act) override;
|
||||
void DrawArrays(int start, int count) override;
|
||||
void DrawElements(int numIndices, size_t offset) override;
|
||||
int SetupFrame(FModel *model, unsigned int frame1, unsigned int frame2, unsigned int size, const TArray<VSMatrix>& bones, int boneStartIndex) override;
|
||||
void SetupFrame(FModel *model, unsigned int frame1, unsigned int frame2, unsigned int size, int boneStartIndex) override;
|
||||
int UploadBones(const TArray<VSMatrix> &bones) override;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue