add OverlayComponentManager destructor

This commit is contained in:
Nick Fisher
2025-07-01 10:51:00 +08:00
parent 0c2e4e6faa
commit 3ca1cc0747

View File

@@ -39,6 +39,11 @@ namespace thermion
mDepthMaterialInstance = mDepthMaterial->createInstance();
}
~OverlayComponentManager() {
mEngine->destroy(mDepthMaterialInstance);
mEngine->destroy(mDepthMaterial);
}
void addOverlayComponent(utils::Entity target, filament::MaterialInstance *materialInstance)
{
auto *color = mRenderTarget->getTexture(filament::RenderTarget::AttachmentPoint::COLOR);