设备上跑通 人脸检测和 线条绘制
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user