virtual dtor for IDrawable

This commit is contained in:
Adam Jensen 2024-05-03 00:31:42 +01:00
parent d1146a59c2
commit bf8e67153e
3 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,7 @@ public:
virtual void draw(Matrix *, float) = 0; // 1C
virtual bool GetBoundingSphere(Vector *pCenter, float *pRadius) { return false; } // 2C
virtual bool GetBoundingBox(Vector *pMin, Vector *pMax) { return false; } // 30
virtual ~IDrawable() = default; // 38
};
}

View File

@ -179,6 +179,10 @@ bool InstanceDrawable::GetBoundingBox(Vector *pMin, Vector *pMax) {
return rm->getBoundingBox(*(Vector3*)pMin, *(Vector3*)pMax);
}
InstanceDrawable::~InstanceDrawable() {
RemoveFromDirtyList();
}
void InstanceDrawable::PrepareMatrixState(Matrix *matrix, dtp::Model *model, RenderModelInstance *rmi, bool force) { // line 1880
if (true || force) {
auto boneCount = rmi->GetRenderMesh()->getBoneCount();

View File

@ -63,6 +63,7 @@ public:
void draw(cdc::Matrix *, float) override;
bool GetBoundingSphere(Vector *pCenter, float *pRadius) override;
bool GetBoundingBox(Vector *pMin, Vector *pMax) override;
~InstanceDrawable();
void PrepareMatrixState(Matrix*, dtp::Model*, RenderModelInstance*, bool force);
void AddToDirtyList();