update imgui 0.6

This commit is contained in:
Benedikt Mandelkow 2020-11-23 00:30:06 +01:00 committed by 4bb4
parent 07ff32ea2a
commit c5ec153488
7 changed files with 20 additions and 17 deletions

View file

@ -8,9 +8,9 @@ edition = "2018"
implot = { path = "../../" }
wgpu = "^0.6.0"
winit = "^0.22.2" # opening windows and handling input
winit = "^0.23" # opening windows and handling input
futures = "^0.3.5" # executing async functions using blocking executor
imgui = "^0.5.0"
imgui-winit-support = "^0.5.0" # connection of input (keys) to imgui
imgui-wgpu = "^0.11.0" # imgui backend for drawing using wgpu
imgui = "^0.6.0"
imgui-winit-support = "^0.6.0" # connection of input (keys) to imgui
imgui-wgpu = "^0.12.0" # imgui backend for drawing using wgpu
examples-shared = { path = "../examples-shared" }

View file

@ -63,7 +63,7 @@ pub fn init(title: &str) -> System {
// Set up swap chain
let sc_desc = wgpu::SwapChainDescriptor {
usage: wgpu::TextureUsage::OUTPUT_ATTACHMENT,
format: wgpu::TextureFormat::Bgra8Unorm,
format: wgpu::TextureFormat::Bgra8UnormSrgb,
width: size.width,
height: size.height,
present_mode: wgpu::PresentMode::Mailbox,
@ -99,9 +99,12 @@ pub fn init(title: &str) -> System {
//
// Set up dear imgui wgpu renderer
//
let renderer = RendererConfig::new()
.set_texture_format(sc_desc.format)
.build(&mut imgui, &device, &queue);
let renderer_config = RendererConfig {
texture_format: sc_desc.format,
..Default::default()
};
let renderer = Renderer::new(&mut imgui, &device, &queue, renderer_config);
System {
event_loop,