add resize implementation on Linux and texture/render target destruction etc

This commit is contained in:
Nick Fisher
2022-12-14 14:48:45 +08:00
parent e0c1e545e9
commit 14d71891d3
4 changed files with 66 additions and 20 deletions

View File

@@ -573,6 +573,15 @@ void FilamentViewer::createRenderTarget(uint32_t glTextureId, uint32_t width, ui
}
void FilamentViewer::destroySwapChain() {
if(_rt) {
_view->setRenderTarget(nullptr);
_engine->destroy(_rtDepth);
_engine->destroy(_rtColor);
_engine->destroy(_rt);
_rt = nullptr;
_rtDepth = nullptr;
_rtColor = nullptr;
}
if (_swapChain) {
_engine->destroy(_swapChain);
_swapChain = nullptr;