Move state stuff to its own folder
This commit is contained in:
parent
bf22190ccd
commit
0d7df1d501
4 changed files with 8 additions and 6 deletions
|
@ -1,7 +1,6 @@
|
|||
mod camera;
|
||||
mod chunk;
|
||||
mod cube;
|
||||
mod hud_state;
|
||||
mod light;
|
||||
mod quad;
|
||||
mod state;
|
||||
|
@ -9,7 +8,6 @@ mod texture;
|
|||
mod uniforms;
|
||||
mod vertex;
|
||||
mod world;
|
||||
mod world_state;
|
||||
|
||||
use std::time::{Duration, Instant};
|
||||
use wgpu::SwapChainError;
|
||||
|
|
|
@ -88,7 +88,7 @@ impl HudState {
|
|||
let texture = Texture::from_bytes(
|
||||
render_device,
|
||||
render_queue,
|
||||
include_bytes!("../assets/gui/widgets.png"),
|
||||
include_bytes!("../../assets/gui/widgets.png"),
|
||||
"Texture GUI widgets",
|
||||
)
|
||||
.unwrap();
|
||||
|
@ -151,7 +151,7 @@ impl HudState {
|
|||
let module = &render_device.create_shader_module(&wgpu::ShaderModuleDescriptor {
|
||||
label: Some("UI shader"),
|
||||
flags: wgpu::ShaderFlags::all(),
|
||||
source: wgpu::ShaderSource::Wgsl(include_str!("shaders/ui.wgsl").into()),
|
||||
source: wgpu::ShaderSource::Wgsl(include_str!("../shaders/ui.wgsl").into()),
|
||||
});
|
||||
|
||||
let pipeline_layout =
|
|
@ -1,3 +1,6 @@
|
|||
mod hud;
|
||||
mod world;
|
||||
|
||||
use std::time::Duration;
|
||||
|
||||
use cgmath::{InnerSpace, Rad};
|
||||
|
@ -6,7 +9,8 @@ use winit::{
|
|||
window::Window,
|
||||
};
|
||||
|
||||
use crate::{hud_state::HudState, world_state::WorldState};
|
||||
use hud::HudState;
|
||||
use world::WorldState;
|
||||
|
||||
pub struct State {
|
||||
pub window_size: winit::dpi::PhysicalSize<u32>,
|
|
@ -161,7 +161,7 @@ impl WorldState {
|
|||
&(wgpu::ShaderModuleDescriptor {
|
||||
label: Some("shader"),
|
||||
flags: wgpu::ShaderFlags::all(),
|
||||
source: wgpu::ShaderSource::Wgsl(include_str!("shaders/world.wgsl").into()),
|
||||
source: wgpu::ShaderSource::Wgsl(include_str!("../shaders/world.wgsl").into()),
|
||||
}),
|
||||
);
|
||||
|
Loading…
Reference in a new issue