| 1365 | template <vkb::BindingType bindingType> |
| 1366 | inline void Gui<bindingType>::update(const float delta_time) |
| 1367 | { |
| 1368 | if (visible != prev_visible) |
| 1369 | { |
| 1370 | drawer.set_dirty(true); |
| 1371 | prev_visible = visible; |
| 1372 | } |
| 1373 | |
| 1374 | if (!visible) |
| 1375 | { |
| 1376 | ImGui::EndFrame(); |
| 1377 | return; |
| 1378 | } |
| 1379 | |
| 1380 | // Update imGui |
| 1381 | ImGuiIO &io = ImGui::GetIO(); |
| 1382 | auto extent = render_context.get_surface_extent(); |
| 1383 | resize(extent.width, extent.height); |
| 1384 | io.DeltaTime = delta_time; |
| 1385 | |
| 1386 | // Render to generate draw buffers |
| 1387 | ImGui::Render(); |
| 1388 | } |
| 1389 | |
| 1390 | template <vkb::BindingType bindingType> |
| 1391 | inline bool Gui<bindingType>::update_buffers() |
| 1392 | { |
no test coverage detected