Revert "fix for vkdoom"

This reverts commit 5eb9a1095e.

Revert "upload bones 😅"

This reverts commit cc766311f7.

Revert "remove bone component cache to decrease memory consumption"

This reverts commit e2908ce0a3.
This commit is contained in:
nashmuhandes 2025-01-30 20:44:14 +08:00
commit aba5cbf768
21 changed files with 113 additions and 80 deletions

View file

@ -169,19 +169,16 @@ void FHWModelRenderer::DrawElements(int numIndices, size_t offset)
//
//===========================================================================
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)
int FHWModelRenderer::SetupFrame(FModel *model, unsigned int frame1, unsigned int frame2, unsigned int size, const TArray<VSMatrix>& bones, int boneStartIndex)
{
auto mdbuff = static_cast<FModelVertexBuffer*>(model->GetVertexBuffer(GetType()));
state.SetBoneIndexBase(boneStartIndex);
boneIndexBase = boneStartIndex >= 0 ? boneStartIndex : state.UploadBones(bones);
state.SetBoneIndexBase(boneIndexBase);
if (mdbuff)
{
state.SetVertexBuffer(mdbuff->vertexBuffer(), frame1, frame2);
if (mdbuff->indexBuffer()) state.SetIndexBuffer(mdbuff->indexBuffer());
}
return boneIndexBase;
}

View file

@ -59,8 +59,7 @@ 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;
void SetupFrame(FModel *model, unsigned int frame1, unsigned int frame2, unsigned int size, int boneStartIndex) override;
int UploadBones(const TArray<VSMatrix>& bones) override;
int SetupFrame(FModel *model, unsigned int frame1, unsigned int frame2, unsigned int size, const TArray<VSMatrix>& bones, int boneStartIndex) override;
};