forked from StrafesNET/strafe-client
remove graphics stuff from main
This commit is contained in:
parent
85b70331fd
commit
0bf253aa11
@ -39,27 +39,11 @@ pub trait Example: 'static + Sized {
|
||||
fn required_limits() -> wgpu::Limits {
|
||||
wgpu::Limits::downlevel_webgl2_defaults() // These downlevel limits will allow the code to run on all possible hardware
|
||||
}
|
||||
fn init(
|
||||
config: &wgpu::SurfaceConfiguration,
|
||||
adapter: &wgpu::Adapter,
|
||||
device: &wgpu::Device,
|
||||
queue: &wgpu::Queue,
|
||||
) -> Self;
|
||||
fn resize(
|
||||
&mut self,
|
||||
config: &wgpu::SurfaceConfiguration,
|
||||
device: &wgpu::Device,
|
||||
queue: &wgpu::Queue,
|
||||
);
|
||||
fn update(&mut self, window: &winit::window::Window, device: &wgpu::Device, queue: &wgpu::Queue, event: WindowEvent);
|
||||
fn init() -> Self;
|
||||
fn resize(&mut self);
|
||||
fn update(&mut self, window: &winit::window::Window, event: WindowEvent);
|
||||
fn device_event(&mut self, window: &winit::window::Window, event: DeviceEvent);
|
||||
fn render(
|
||||
&mut self,
|
||||
view: &wgpu::TextureView,
|
||||
device: &wgpu::Device,
|
||||
queue: &wgpu::Queue,
|
||||
spawner: &Spawner,
|
||||
);
|
||||
fn render(&self);
|
||||
}
|
||||
|
||||
struct Setup {
|
||||
@ -298,7 +282,7 @@ fn start<E: Example>(
|
||||
surface.configure(&device, &config);
|
||||
|
||||
log::info!("Initializing the example...");
|
||||
let mut example = E::init(&config, &adapter, &device, &queue);
|
||||
let mut example=E::init();
|
||||
|
||||
log::info!("Entering render loop...");
|
||||
event_loop.run(move |event, _, control_flow| {
|
||||
|
@ -93,12 +93,7 @@ impl framework::Example for GlobalState {
|
||||
fn required_limits() -> wgpu::Limits {
|
||||
wgpu::Limits::default() //framework.rs was using goofy limits that caused me a multi-day headache
|
||||
}
|
||||
fn init(
|
||||
config: &wgpu::SurfaceConfiguration,
|
||||
_adapter: &wgpu::Adapter,
|
||||
device: &wgpu::Device,
|
||||
queue: &wgpu::Queue,
|
||||
) -> Self {
|
||||
fn init() -> Self {
|
||||
//wee
|
||||
let user_settings=settings::read_user_settings();
|
||||
let mut indexed_models = Vec::new();
|
||||
@ -190,7 +185,7 @@ impl framework::Example for GlobalState {
|
||||
}
|
||||
|
||||
#[allow(clippy::single_match)]
|
||||
fn update(&mut self, window: &winit::window::Window, device: &wgpu::Device, queue: &wgpu::Queue, event: winit::event::WindowEvent) {
|
||||
fn update(&mut self, window: &winit::window::Window, event: winit::event::WindowEvent) {
|
||||
let time=integer::Time::from_nanos(self.start_time.elapsed().as_nanos() as i64);
|
||||
match event {
|
||||
winit::event::WindowEvent::DroppedFile(path)=>{
|
||||
|
Loading…
Reference in New Issue
Block a user