Almost done with To-Dos

- The compile errors should be fixed
- Implemented a way for skeletal models using the MODELSAREATTACHMENTS flag to not upload duplicate bones to the bone buffer
This commit is contained in:
Shiny Metagross 2022-08-15 20:08:32 -07:00 committed by Christoph Oelckers
commit b7c1c53eb0
17 changed files with 37 additions and 32 deletions

View file

@ -628,7 +628,7 @@ int FOBJModel::FindFrame(const char* name, bool nodefault)
* @param inter The amount to interpolate the two frames.
* @param translation The translation for the skin
*/
void FOBJModel::RenderFrame(FModelRenderer *renderer, FGameTexture * skin, int frameno, int frameno2, double inter, int translation, const FTextureID* surfaceskinids, const TArray<VSMatrix>& boneData)
void FOBJModel::RenderFrame(FModelRenderer *renderer, FGameTexture * skin, int frameno, int frameno2, double inter, int translation, const FTextureID* surfaceskinids, const TArray<VSMatrix>& boneData, int boneStartPosition)
{
// Prevent the model from rendering if the frame number is < 0
if (frameno < 0 || frameno2 < 0) return;
@ -657,7 +657,7 @@ void FOBJModel::RenderFrame(FModelRenderer *renderer, FGameTexture * skin, int f
}
renderer->SetMaterial(userSkin, false, translation);
renderer->SetupFrame(this, surf->vbStart, surf->vbStart, surf->numTris * 3, {});
renderer->SetupFrame(this, surf->vbStart, surf->vbStart, surf->numTris * 3, {}, -1);
renderer->DrawArrays(0, surf->numTris * 3);
}
}