Fixes bones when using OpenGL 3.3 (UBO bone data)

This commit is contained in:
Emile Belanger 2023-01-29 18:26:35 +00:00 committed by Christoph Oelckers
parent c8bd2deb1e
commit 7349c95623

View file

@ -140,7 +140,9 @@ 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)
{
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);
if (mdbuff)
{