android 平台跑通中文路径
This commit is contained in:
@@ -639,10 +639,10 @@ Texture Application::loadTexture(std::string path, Texture& tex, bool srgb)
|
||||
processWithVulkan(image.data(), w, h, w * 4, image.size(), tex, srgb);
|
||||
return tex;
|
||||
}
|
||||
|
||||
Texture Application::loadTextureExample(std::string path, Texture& tex, bool srgb)
|
||||
#ifdef _WIN32
|
||||
Texture Application::loadTextureExample(std::wstring path, Texture& tex, bool srgb)
|
||||
{
|
||||
std::vector<unsigned char> data = readFileUnsignedChar(path, true);
|
||||
std::vector<unsigned char> data = readFileUnsignedCharWin32(path, true);
|
||||
std::vector<unsigned char> image;
|
||||
unsigned w, h;
|
||||
unsigned error = lodepng::decode(image, w, h, data, LCT_RGBA, 8);
|
||||
@@ -650,6 +650,10 @@ Texture Application::loadTextureExample(std::string path, Texture& tex, bool srg
|
||||
return tex;
|
||||
}
|
||||
|
||||
#endif // _WIN32
|
||||
|
||||
|
||||
|
||||
|
||||
void Application::createTexture(VkDevice device, VkPhysicalDevice physicalDevice, int width, int height, Texture& texture, bool srgb)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user