fix bug and add log

This commit is contained in:
xsl
2026-04-23 22:18:22 +08:00
parent fb434f09b8
commit 27b7075818
7 changed files with 327 additions and 40 deletions
+11
View File
@@ -81,6 +81,17 @@ public:
bool _applicationInited = false;
void cleanupSecondInit();
// Tear down only the window-dependent Vulkan objects so we can survive an
// Android APP_CMD_TERM_WINDOW (screen off / background / rotate).
// Keeps renderPass / pipelines / VMA / textures / FaceApp resources intact,
// so pipelines created by FaceApp remain valid for the new swapchain.
// Caller MUST hold any app-level mutexes that serialize JNI -> Vulkan access.
void cleanupForWindowLost();
// Rebuild the window-dependent Vulkan objects torn down above.
// Safe to call only after cleanupForWindowLost().
void reinitForNewWindow();
protected:
void loadTexture(std::string path, Texture& tex, bool srgb, VkCommandPool pool);
void loadTexture(std::vector<unsigned char>& image_data, size_t image_size, int w, int h, Texture& tex, bool srgb, VkCommandPool pool, std::string path);