update deps

This commit is contained in:
Lauri Räsänen 2023-01-23 17:15:02 +02:00
parent 1a7a6707d9
commit 320171e304
3 changed files with 456 additions and 212 deletions

627
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -6,19 +6,20 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
winit = "0.26" winit = "0.27.5"
env_logger = "0.9" env_logger = "0.10.0"
log = "0.4" log = "0.4.17"
wgpu = "0.13" wgpu = "0.14.2"
pollster = "0.2" pollster = "0.2.5"
bytemuck = { version = "1.4", features = [ "derive" ] } bytemuck = { version = "1.13.0", features = ["derive"] }
image = { version = "0.24", features = [ "png", "tga" ] } image = { version = "0.24.5", features = ["png", "tga"] }
anyhow = "1.0" anyhow = "1.0.68"
cgmath = "0.18" cgmath = "0.18"
tobj = { version = "3.2.1", features = [ "async", ] } tobj = { version = "3.2.1", features = ["async"] }
gltf = "1.0.0" gltf = "1.0.0"
wgpu-types = "0.14.1"
[build-dependencies] [build-dependencies]
anyhow = "1.0" anyhow = "1.0.68"
fs_extra = "1.2" fs_extra = "1.2.0"
glob = "0.3" glob = "0.3.1"

View file

@ -70,6 +70,7 @@ impl State {
width: size.width, width: size.width,
height: size.height, height: size.height,
present_mode: wgpu::PresentMode::Fifo, present_mode: wgpu::PresentMode::Fifo,
alpha_mode: wgpu::CompositeAlphaMode::Opaque,
}; };
surface.configure(&device, &config); surface.configure(&device, &config);
@ -192,10 +193,14 @@ impl State {
label: Some("texture_bind_group_layout"), label: Some("texture_bind_group_layout"),
}); });
let obj_model = let obj_model = resources::load_model_gltf(
resources::load_model_gltf("sponza/Sponza.gltf", &device, &queue, &texture_bind_group_layout) "sponza/Sponza.gltf",
.await &device,
.unwrap(); &queue,
&texture_bind_group_layout,
)
.await
.unwrap();
let instances: Vec<Instance>; let instances: Vec<Instance>;
if NUM_INSTANCES_PER_ROW > 1 { if NUM_INSTANCES_PER_ROW > 1 {
@ -346,7 +351,8 @@ impl State {
// Update the light // Update the light
let old_position: cgmath::Vector3<_> = self.light_uniform.position.into(); let old_position: cgmath::Vector3<_> = self.light_uniform.position.into();
self.light_uniform.position = self.light_uniform.position =
(cgmath::Quaternion::from_angle_y(cgmath::Deg(90.0 * dt.as_secs_f32())) * old_position).into(); (cgmath::Quaternion::from_angle_y(cgmath::Deg(90.0 * dt.as_secs_f32())) * old_position)
.into();
self.queue.write_buffer( self.queue.write_buffer(
&self.light_buffer, &self.light_buffer,
0, 0,