Compare commits

..

No commits in common. "84ddf323ec03260496e658420b001c157e276c52" and "f0f9003247343a045b585fbd263b35fe8faa7089" have entirely different histories.

2 changed files with 5 additions and 10 deletions

View File

@ -2,9 +2,9 @@ use egui::{Context, TextureId};
use egui_wgpu_backend::{RenderPass, ScreenDescriptor}; use egui_wgpu_backend::{RenderPass, ScreenDescriptor};
use egui_winit_platform::Platform; use egui_winit_platform::Platform;
use wgpu::{ use wgpu::{
Adapter, Backends, Color, CommandEncoder, CompositeAlphaMode, Device, Extent3d, FilterMode, Adapter, Backends, Color, CommandEncoder, Device, Extent3d, FilterMode, Instance, Queue,
Instance, Queue, RequestDeviceError, Surface, SurfaceConfiguration, Texture, TextureFormat, RequestDeviceError, Surface, SurfaceConfiguration, Texture, TextureFormat, TextureUsages,
TextureUsages, TextureView, TextureViewDescriptor, TextureView, TextureViewDescriptor, CompositeAlphaMode,
}; };
use winit::dpi::PhysicalSize; use winit::dpi::PhysicalSize;
use winit::error::OsError; use winit::error::OsError;
@ -350,11 +350,7 @@ fn request_device(adapter: &Adapter) -> Result<(Device, Queue), RequestDeviceErr
)) ))
} }
fn surface_config( fn surface_config(window: &Window, alpha_mode: CompositeAlphaMode, format: TextureFormat) -> SurfaceConfiguration {
window: &Window,
alpha_mode: CompositeAlphaMode,
format: TextureFormat,
) -> SurfaceConfiguration {
use wgpu::PresentMode; use wgpu::PresentMode;
let size = window.inner_size(); let size = window.inner_size();
@ -364,7 +360,7 @@ fn surface_config(
width: size.width as u32, width: size.width as u32,
height: size.height as u32, height: size.height as u32,
present_mode: PresentMode::Immediate, present_mode: PresentMode::Immediate,
alpha_mode, alpha_mode
} }
} }

View File

@ -121,7 +121,6 @@ fn main() {
} }
Event::RedrawRequested(..) => { Event::RedrawRequested(..) => {
app.update_time(start_time.elapsed().as_secs_f64()); app.update_time(start_time.elapsed().as_secs_f64());
app.paint(&cpu);
} }
Event::WindowEvent { event, .. } => match event { Event::WindowEvent { event, .. } => match event {
WindowEvent::Resized(size) => app.resize(size), WindowEvent::Resized(size) => app.resize(size),