现在才是代码完成。

This commit is contained in:
xsl
2025-10-20 15:27:33 +08:00
parent d2da523636
commit e6a776665f
6 changed files with 323 additions and 167 deletions
+2 -3
View File
@@ -43,7 +43,7 @@ public:
void createSyncObjects();
void drawFrame();
virtual void render(VkCommandBuffer commandBuffer);
bool isInited() { return inited; }
virtual bool isInited() { return inited; }
protected:
@@ -73,7 +73,7 @@ protected:
bool inited = false;
protected:
Texture loadTexture(std::string path, Texture tex);
Texture loadTexture(std::string path, Texture& tex);
void processWithVulkan(uint8_t* data, int width, int height, int rowStride, size_t dataSize, Texture& out_texture, bool srgb);
uint32_t findMemoryType(VkPhysicalDevice physicalDevice, uint32_t typeFilter,
VkMemoryPropertyFlags properties);
@@ -83,6 +83,5 @@ protected:
void endSingleTimeCommands(VkDevice device, VkCommandPool commandPool, VkQueue queue, VkCommandBuffer commandBuffer);
void transitionImageLayout(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout oldLayout, VkImageLayout newLayout);
void destroy_texture(Texture texture);
VkQueue queue;
std::mutex mtx;
};