| 1328 | } |
| 1329 | |
| 1330 | std::unique_ptr<vkb::sg::SubMesh> ApiVulkanSample::load_model(const std::string &file, uint32_t index, bool storage_buffer, VkBufferUsageFlags additional_buffer_usage_flags) |
| 1331 | { |
| 1332 | vkb::GLTFLoader loader{get_device()}; |
| 1333 | |
| 1334 | std::unique_ptr<vkb::sg::SubMesh> model = loader.read_model_from_file(file, index, storage_buffer, additional_buffer_usage_flags); |
| 1335 | |
| 1336 | if (!model) |
| 1337 | { |
| 1338 | LOGE("Cannot load model from file: {}", file.c_str()); |
| 1339 | throw std::runtime_error("Cannot load model from: " + file); |
| 1340 | } |
| 1341 | |
| 1342 | return model; |
| 1343 | } |
| 1344 | |
| 1345 | void ApiVulkanSample::draw_model(std::unique_ptr<vkb::sg::SubMesh> &model, VkCommandBuffer command_buffer, uint32_t instance_count) |
| 1346 | { |
nothing calls this directly
no test coverage detected