Create window with full hd size

This commit is contained in:
Dennis Kobert
2023-06-16 11:35:42 -07:00
committed by Keavon Chambers
parent 8cd161f087
commit dccb5235c0
3 changed files with 11 additions and 8 deletions
+5 -6
View File
@@ -26,10 +26,7 @@ impl NodeGraphUpdateSender for UpdateLogger {
} }
fn main() -> Result<(), Box<dyn Error>> { fn main() -> Result<(), Box<dyn Error>> {
let colors = ColoredLevelConfig::new() let colors = ColoredLevelConfig::new().debug(Color::Magenta).info(Color::Green).error(Color::Red);
.debug(Color::Magenta)
.info(Color::Green)
.error(Color::Red);
fern::Dispatch::new() fern::Dispatch::new()
.chain(std::io::stdout()) .chain(std::io::stdout())
.level_for("foodcalc", log::LevelFilter::Trace) .level_for("foodcalc", log::LevelFilter::Trace)
@@ -72,9 +69,11 @@ fn main() -> Result<(), Box<dyn Error>> {
node_graph_message_sender: &UpdateLogger {}, node_graph_message_sender: &UpdateLogger {},
imaginate_preferences: &ImaginatePreferences::default(), imaginate_preferences: &ImaginatePreferences::default(),
}; };
loop {
let result = block_on((&executor).execute(editor_api.clone()))?;
println!("result: {:?}", result);
}
let result = block_on((&executor).execute(editor_api))?;
println!("result: {:?}", result);
Ok(()) Ok(())
} }
+5 -1
View File
@@ -97,7 +97,11 @@ impl ApplicationIo for WasmApplicationIo {
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
fn create_surface(&self) -> SurfaceHandle<Self::Surface> { fn create_surface(&self) -> SurfaceHandle<Self::Surface> {
let event_loop = winit::event_loop::EventLoop::new(); let event_loop = winit::event_loop::EventLoop::new();
let window = winit::window::WindowBuilder::new().with_title("Graphite").build(&event_loop).unwrap(); let window = winit::window::WindowBuilder::new()
.with_title("Graphite")
.with_inner_size(winit::dpi::PhysicalSize::new(1920, 1080))
.build(&event_loop)
.unwrap();
SurfaceHandle { SurfaceHandle {
surface_id: SurfaceId(window.id().into()), surface_id: SurfaceId(window.id().into()),
surface: window, surface: window,
+1 -1
View File
@@ -405,7 +405,7 @@ impl gpu_executor::GpuExecutor for WgpuExecutor {
width: 1920, width: 1920,
height: 1080, height: 1080,
present_mode: surface_caps.present_modes[0], present_mode: surface_caps.present_modes[0],
alpha_mode: wgpu::CompositeAlphaMode::PreMultiplied, alpha_mode: surface_caps.alpha_modes[0],
view_formats: vec![wgpu::TextureFormat::Bgra8UnormSrgb], view_formats: vec![wgpu::TextureFormat::Bgra8UnormSrgb],
}; };
surface.configure(&self.context.device, &config); surface.configure(&self.context.device, &config);