diff --git a/client/Cargo.toml b/client/Cargo.toml index d00ff005..3506ac5c 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -14,8 +14,8 @@ server = { path = "../server" } tracing = "0.1.10" ash = { version = "0.38.0", default-features = false, features = ["loaded", "debug", "std"] } lahar = { git = "https://github.com/Ralith/lahar", rev = "7963ae5750ea61fa0a894dbb73d3be0ac77255d2" } -yakui = { git = "https://github.com/SecondHalfGames/yakui", rev = "2eda113392712e87eb1c372b7d495edc29b8ccdc" } -yakui-vulkan = { git = "https://github.com/SecondHalfGames/yakui", rev = "2eda113392712e87eb1c372b7d495edc29b8ccdc" } +yakui = { git = "https://github.com/SecondHalfGames/yakui", rev = "cbac6c06dbf948268df6d9e93346788e977cbef3" } +yakui-vulkan = { git = "https://github.com/SecondHalfGames/yakui", rev = "cbac6c06dbf948268df6d9e93346788e977cbef3" } winit = "0.29.10" ash-window = "0.13" raw-window-handle = "0.6" diff --git a/client/src/graphics/draw.rs b/client/src/graphics/draw.rs index b9027bc9..d26f7117 100644 --- a/client/src/graphics/draw.rs +++ b/client/src/graphics/draw.rs @@ -194,6 +194,7 @@ impl Draw { let mut yakui_vulkan_options = yakui_vulkan::Options::default(); yakui_vulkan_options.render_pass = gfx.render_pass; + yakui_vulkan_options.subpass = 1; let mut yakui_vulkan = yakui_vulkan::YakuiVulkan::new( &yakui_vulkan::VulkanContext::new(device, gfx.queue, gfx.memory_properties), yakui_vulkan_options, @@ -287,17 +288,16 @@ impl Draw { let state = &mut self.states[self.next_state]; let cmd = state.cmd; - let yakui_vulkan_context = yakui_vulkan::VulkanContext::new( - device, - self.gfx.queue, - self.gfx.memory_properties, - ); + let yakui_vulkan_context = + yakui_vulkan::VulkanContext::new(device, self.gfx.queue, self.gfx.memory_properties); - self.yak.set_surface_size([extent.width as f32, extent.height as f32].into()); - self.yak.set_unscaled_viewport(yakui::geometry::Rect::from_pos_size( - Default::default(), - [extent.width as f32, extent.height as f32].into(), - )); + self.yak + .set_surface_size([extent.width as f32, extent.height as f32].into()); + self.yak + .set_unscaled_viewport(yakui::geometry::Rect::from_pos_size( + Default::default(), + [extent.width as f32, extent.height as f32].into(), + )); self.yak.start(); yakui::text(96.0, "Hello world!"); @@ -373,7 +373,8 @@ impl Draw { timestamp_index += 1; self.yakui_vulkan.transfers_finished(&yakui_vulkan_context); - self.yakui_vulkan.transfer(paint, &yakui_vulkan_context, cmd); + self.yakui_vulkan + .transfer(paint, &yakui_vulkan_context, cmd); // Schedule transfer of uniform data. Note that we defer actually preparing the data to just // before submitting the command buffer so time-sensitive values can be set with minimum @@ -501,12 +502,12 @@ impl Draw { } } - // TODO - self.yakui_vulkan.paint(paint, &yakui_vulkan_context, cmd, extent); - device.cmd_next_subpass(cmd, vk::SubpassContents::INLINE); - //self.fog.draw(device, state.common_ds, cmd); + self.fog.draw(device, state.common_ds, cmd); + + self.yakui_vulkan + .paint(paint, &yakui_vulkan_context, cmd, extent); // Finish up device.cmd_end_render_pass(cmd);