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

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
+2 -2
View File
@@ -626,13 +626,13 @@ uint32_t Application::findMemoryType(VkPhysicalDevice physicalDevice, uint32_t t
throw std::runtime_error("Failed to find suitable memory type!");
}
Texture Application::loadTexture(std::string path, Texture& tex)
Texture Application::loadTexture(std::string path, Texture& tex, bool srgb)
{
std::vector<unsigned char> data = readFileEx(path);
std::vector<unsigned char> image;
unsigned w, h;
unsigned error = lodepng::decode(image, w, h, data, LCT_RGBA, 8);
processWithVulkan(image.data(), w, h, w * 4, image.size(), tex, true);
processWithVulkan(image.data(), w, h, w * 4, image.size(), tex, srgb);
return tex;
}