设备上跑通 人脸检测和 线条绘制

This commit is contained in:
xsl
2025-10-20 22:51:44 +08:00
parent 361708bd11
commit 220e1873f9
11 changed files with 667 additions and 9 deletions
+5 -2
View File
@@ -43,6 +43,8 @@ public:
virtual void render(VkCommandBuffer commandBuffer);
virtual bool isInited() { return inited; }
void processWithVulkan(uint8_t* data, int width, int height, int rowStride, size_t dataSize, Texture& out_texture, bool srgb);
protected:
VkPhysicalDevice physicalDevice = VK_NULL_HANDLE; // 物理设备
@@ -69,10 +71,11 @@ protected:
int currentFrame = 0;
int MAX_FRAMES_IN_FLIGHT = 2;
bool inited = false;
protected:
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);
Texture loadTexture(std::string path, Texture& tex, bool srgb);
uint32_t findMemoryType(VkPhysicalDevice physicalDevice, uint32_t typeFilter,
VkMemoryPropertyFlags properties);
void createTexture(VkDevice device, VkPhysicalDevice physicalDevice, int width, int height, Texture& texture, bool srgb);