save code

This commit is contained in:
xsl
2025-12-24 10:55:30 +08:00
parent 4c5a05ae21
commit f5b2d490c0
5 changed files with 81 additions and 63 deletions
+5 -2
View File
@@ -46,7 +46,7 @@ public:
void createSyncObjects();
virtual void drawFrame(long long frameTime);
virtual void render(VkCommandBuffer commandBuffer, long long frameTime);
virtual bool isInited() { return inited; }
virtual bool isInited() { return _applicationInited; }
void processWithVulkan(uint8_t* data, int width, int height, int rowStride, size_t dataSize, Texture& texture, bool srgb, VkCommandPool pool, std::string tex_path);
@@ -77,8 +77,9 @@ public:
std::vector<VkFence> imagesInFlight; // 跟踪每个图像的使用状态
int currentFrame = 0;
int MAX_FRAMES_IN_FLIGHT = 2;
bool inited = false;
bool _applicationInited = false;
bool _sceondInited = true;
protected:
void loadTexture(std::string path, Texture& tex, bool srgb, VkCommandPool pool);
@@ -99,4 +100,6 @@ protected:
long long _lastDrawFrameTime;
std::mutex changeMotionMtx;
};