| 1343 | } |
| 1344 | |
| 1345 | void ApiVulkanSample::draw_model(std::unique_ptr<vkb::sg::SubMesh> &model, VkCommandBuffer command_buffer, uint32_t instance_count) |
| 1346 | { |
| 1347 | VkDeviceSize offsets[1] = {0}; |
| 1348 | |
| 1349 | const auto &vertex_buffer = model->vertex_buffers.at("vertex_buffer"); |
| 1350 | auto &index_buffer = model->index_buffer; |
| 1351 | |
| 1352 | vkCmdBindVertexBuffers(command_buffer, 0, 1, vertex_buffer.get(), offsets); |
| 1353 | vkCmdBindIndexBuffer(command_buffer, index_buffer->get_handle(), 0, model->index_type); |
| 1354 | vkCmdDrawIndexed(command_buffer, model->vertex_indices, instance_count, 0, 0, 0); |
| 1355 | } |
| 1356 | |
| 1357 | void ApiVulkanSample::with_command_buffer(const std::function<void(VkCommandBuffer command_buffer)> &f, VkSemaphore signalSemaphore) |
| 1358 | { |
nothing calls this directly
no test coverage detected