| 1201 | } |
| 1202 | |
| 1203 | bool HelloTriangleV13::prepare(const vkb::ApplicationOptions &options) |
| 1204 | { |
| 1205 | assert(options.window != nullptr); |
| 1206 | |
| 1207 | init_instance(); |
| 1208 | |
| 1209 | context.surface = options.window->create_surface(context.instance, nullptr); |
| 1210 | auto &extent = options.window->get_extent(); |
| 1211 | context.swapchain_dimensions.width = extent.width; |
| 1212 | context.swapchain_dimensions.height = extent.height; |
| 1213 | |
| 1214 | if (!context.surface) |
| 1215 | { |
| 1216 | throw std::runtime_error("Failed to create window surface."); |
| 1217 | } |
| 1218 | |
| 1219 | init_device(); |
| 1220 | |
| 1221 | init_vertex_buffer(); |
| 1222 | |
| 1223 | init_swapchain(); |
| 1224 | |
| 1225 | // Create the necessary objects for rendering. |
| 1226 | init_pipeline(); |
| 1227 | |
| 1228 | return true; |
| 1229 | } |
| 1230 | |
| 1231 | void HelloTriangleV13::update(float delta_time) |
| 1232 | { |
nothing calls this directly
no test coverage detected