Fix issues with de/re-initialisation
This commit is contained in:
@@ -30,6 +30,7 @@ namespace openVulkanoCpp::AR::Playback
|
||||
colorImage.intrinsic = frameMetadata.intrinsic.GetForResolution({ colorImgData.cols, colorImgData.rows });
|
||||
colorImage.format = ArImagePlanar::Format::RGB;
|
||||
colorImage.luminescenceOrColor = { colorImgData.data, { colorImgData.cols, colorImgData.rows }};
|
||||
SetSaved();
|
||||
}
|
||||
|
||||
ArImagePlanar ArFramePlayback::GetCameraImage()
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace openVulkanoCpp
|
||||
renderer->Close();
|
||||
window->Close();
|
||||
app->Close();
|
||||
platform->Close();
|
||||
if (platform) platform->Close();
|
||||
windowTitleFormat = "";
|
||||
Logger::MANAGER->info("Shutdown complete");
|
||||
}
|
||||
|
||||
@@ -60,8 +60,10 @@ namespace openVulkanoCpp
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
#ifndef __APPLE__
|
||||
ImGui::DestroyPlatformWindows();
|
||||
|
||||
#endif
|
||||
|
||||
io.BackendPlatformName = nullptr;
|
||||
io.BackendPlatformUserData = nullptr;
|
||||
io.BackendFlags = ImGuiBackendFlags_None;
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace openVulkanoCpp::Scene
|
||||
void Drawable::RemoveNode(Node* node)
|
||||
{
|
||||
Utils::Remove(m_nodes, node);
|
||||
if (m_nodes.empty())
|
||||
if (m_nodes.empty() && m_scene)
|
||||
{
|
||||
m_scene->RemoveDrawable(this);
|
||||
m_scene = nullptr;
|
||||
|
||||
@@ -84,6 +84,7 @@ namespace openVulkanoCpp::Vulkan
|
||||
|
||||
void Renderer::Resize(const uint32_t newWidth, const uint32_t newHeight)
|
||||
{
|
||||
if (!context.device) return;
|
||||
context.Resize(newWidth, newHeight);
|
||||
resourceManager.Resize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user