| 297 | } |
| 298 | |
| 299 | void LoadShader(std::vector<char>& out, const char* fileName) |
| 300 | { |
| 301 | std::ifstream file(std::string(SHADER_PATH1) + fileName, std::ios::ate | std::ios::binary); |
| 302 | if(file.is_open() == false) |
| 303 | file.open(std::string(SHADER_PATH2) + fileName, std::ios::ate | std::ios::binary); |
| 304 | assert(file.is_open()); |
| 305 | size_t fileSize = (size_t)file.tellg(); |
| 306 | if(fileSize > 0) |
| 307 | { |
| 308 | out.resize(fileSize); |
| 309 | file.seekg(0); |
| 310 | file.read(out.data(), fileSize); |
| 311 | file.close(); |
| 312 | } |
| 313 | else |
| 314 | out.clear(); |
| 315 | } |
| 316 | |
| 317 | static VkBool32 VKAPI_PTR MyDebugReportCallback( |
| 318 | VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, |