fix for vkdoom
This commit is contained in:
parent
cc766311f7
commit
5eb9a1095e
5 changed files with 9 additions and 2 deletions
|
|
@ -25,5 +25,6 @@ public:
|
|||
virtual void DrawArrays(int start, int count) = 0;
|
||||
virtual void DrawElements(int numIndices, size_t offset) = 0;
|
||||
virtual void SetupFrame(FModel* model, unsigned int frame1, unsigned int frame2, unsigned int size, int boneStartIndex) {};
|
||||
virtual int UploadBones(const TArray<VSMatrix>& bones) = 0;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -470,7 +470,7 @@ double IQMModel::FindFramerate(FName name)
|
|||
void IQMModel::RenderFrame(FModelRenderer* renderer, FGameTexture* skin, int frame1, int frame2, double inter, FTranslationID translation, const FTextureID* surfaceskinids, int boneStartPosition, void * act)
|
||||
{
|
||||
|
||||
renderer->SetupFrame(this, 0, 0, NumVertices, boneStartPosition >= 0 ? boneStartPosition : screen->mBones->UploadBones(boneData));
|
||||
renderer->SetupFrame(this, 0, 0, NumVertices, boneStartPosition >= 0 ? boneStartPosition : renderer->UploadBones(boneData));
|
||||
|
||||
FGameTexture* lastSkin = nullptr;
|
||||
for (unsigned i = 0; i < Meshes.Size(); i++)
|
||||
|
|
|
|||
|
|
@ -564,7 +564,7 @@ void RenderFrameModels(FModelRenderer *renderer, FLevelLocals *Level, const FSpr
|
|||
|
||||
if(smf_flags & MDL_MODELSAREATTACHMENTS || is_decoupled)
|
||||
{
|
||||
boneStartingPosition = boneData ? screen->mBones->UploadBones(*boneData) : -1;
|
||||
boneStartingPosition = boneData ? renderer->UploadBones(*boneData) : -1;
|
||||
evaluatedSingle = true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,6 +169,11 @@ 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)
|
||||
{
|
||||
auto mdbuff = static_cast<FModelVertexBuffer*>(model->GetVertexBuffer(GetType()));
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ public:
|
|||
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;
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue