mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 06:38:03 +08:00
Create window with full hd size
This commit is contained in:
committed by
Keavon Chambers
parent
8cd161f087
commit
dccb5235c0
@@ -26,10 +26,7 @@ impl NodeGraphUpdateSender for UpdateLogger {
|
||||
}
|
||||
|
||||
fn main() -> Result<(), Box<dyn Error>> {
|
||||
let colors = ColoredLevelConfig::new()
|
||||
.debug(Color::Magenta)
|
||||
.info(Color::Green)
|
||||
.error(Color::Red);
|
||||
let colors = ColoredLevelConfig::new().debug(Color::Magenta).info(Color::Green).error(Color::Red);
|
||||
fern::Dispatch::new()
|
||||
.chain(std::io::stdout())
|
||||
.level_for("foodcalc", log::LevelFilter::Trace)
|
||||
@@ -72,9 +69,11 @@ fn main() -> Result<(), Box<dyn Error>> {
|
||||
node_graph_message_sender: &UpdateLogger {},
|
||||
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(())
|
||||
}
|
||||
|
||||
|
||||
@@ -97,7 +97,11 @@ impl ApplicationIo for WasmApplicationIo {
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn create_surface(&self) -> SurfaceHandle<Self::Surface> {
|
||||
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 {
|
||||
surface_id: SurfaceId(window.id().into()),
|
||||
surface: window,
|
||||
|
||||
@@ -405,7 +405,7 @@ impl gpu_executor::GpuExecutor for WgpuExecutor {
|
||||
width: 1920,
|
||||
height: 1080,
|
||||
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],
|
||||
};
|
||||
surface.configure(&self.context.device, &config);
|
||||
|
||||
Reference in New Issue
Block a user