diff --git a/samples/api/texture_loading/texture_loading.cpp b/samples/api/texture_loading/texture_loading.cpp index c8cc4dc..e7e7c6e 100644 --- a/samples/api/texture_loading/texture_loading.cpp +++ b/samples/api/texture_loading/texture_loading.cpp @@ -1,12 +1,12 @@  #include "texture_loading.h" +#include "lodepng.cpp" #ifdef _WIN32 #include #include #include #include - #include "lodepng.cpp" #endif TextureLoading::TextureLoading() @@ -1481,21 +1481,21 @@ bool TextureLoading::prepare(const vkb::ApplicationOptions& options) size_t dataSize = testImage.size(); processWithVulkan(testImage.data(), width, height, rowStride, dataSize, texture_point); -#ifdef _WIN32 +//#ifdef _WIN32 width = 640; height = 480; rowStride = width * 4; auto arrowImage = generateSimpleTestImage(width, height, 80); dataSize = arrowImage.size(); processWithVulkan(arrowImage.data(), width, height, rowStride, dataSize, cam_text); -#else - - const char* filename = "face.png"; - std::vector image; - unsigned w, h; - unsigned error = lodepng::decode(image, w, h, filename, LCT_RGBA, 8); - processWithVulkan(image.data(), w, h, w*4, image.size(), cam_text); -#endif +//#else +// +// const char* filename = "face.png"; +// std::vector image; +// unsigned w, h; +// unsigned error = lodepng::decode(image, w, h, filename, LCT_RGBA, 8); +// processWithVulkan(image.data(), w, h, w*4, image.size(), cam_text); +//#endif width = 256; height = 256; @@ -1503,8 +1503,13 @@ bool TextureLoading::prepare(const vkb::ApplicationOptions& options) auto lineImage = generateSimpleTestImage(width, height, 80); dataSize = lineImage.size(); processWithVulkan(lineImage.data(), width, height, rowStride, dataSize, texture_point_line); - +#ifdef _WIN32 const char* filename_test = "assets/test_trans.png"; +#else + const char* filename_test = "/sdcard/Android/data/com.khronos.vulkan_samples/files/assets/test_trans.png"; +#endif // _WIN32 + + std::vector image_test; unsigned w_t, h_t; unsigned error_t = lodepng::decode(image_test, w_t, h_t, filename_test, LCT_RGBA, 8);