diff options
| author | Irene Knapp <ireneista@irenes.space> | 2026-08-06 16:49:10 -0700 |
|---|---|---|
| committer | Irene Knapp <ireneista@irenes.space> | 2026-08-06 16:49:10 -0700 |
| commit | 26e89267c0d745793d777ad0b1157a5596258515 (patch) | |
| tree | de3d5f79a06a649a46803ba0ecc88375acc2821c /src | |
| parent | 2c8110d93e04a1bfd976fe20c8c7493a41d51eae (diff) | |
move some modules into a new graphics submodule
Force-Push: yes Change-Id: I5cbdf59870258f099fc6dd47ff2f1566376c1585
Diffstat (limited to 'src')
| -rw-r--r-- | src/graphics/mod.rs | 5 | ||||
| -rw-r--r-- | src/graphics/permanent.rs (renamed from src/graphics_permanent.rs) | 0 | ||||
| -rw-r--r-- | src/graphics/scene.rs (renamed from src/graphics_scene.rs) | 2 | ||||
| -rw-r--r-- | src/graphics/window_dressing.rs (renamed from src/graphics_window_dressing.rs) | 4 | ||||
| -rw-r--r-- | src/main.rs | 11 |
5 files changed, 13 insertions, 9 deletions
diff --git a/src/graphics/mod.rs b/src/graphics/mod.rs new file mode 100644 index 0000000..f164588 --- /dev/null +++ b/src/graphics/mod.rs @@ -0,0 +1,5 @@ +#![deny(unsafe_code)] + +pub mod permanent; +pub mod scene; +pub mod window_dressing; diff --git a/src/graphics_permanent.rs b/src/graphics/permanent.rs index 5282e21..5282e21 100644 --- a/src/graphics_permanent.rs +++ b/src/graphics/permanent.rs diff --git a/src/graphics_scene.rs b/src/graphics/scene.rs index f3694f7..e59ae89 100644 --- a/src/graphics_scene.rs +++ b/src/graphics/scene.rs @@ -1,6 +1,6 @@ #![deny(unsafe_code)] use crate::error::*; -use crate::graphics_window_dressing::RenderState; +use crate::graphics::window_dressing::RenderState; use crate::linear_algebra::{ Vec3, Vec4, Transformation }; use crate::shader_data::VertexPushBlock; diff --git a/src/graphics_window_dressing.rs b/src/graphics/window_dressing.rs index 1b5b602..dc7f47f 100644 --- a/src/graphics_window_dressing.rs +++ b/src/graphics/window_dressing.rs @@ -1,6 +1,6 @@ #![deny(unsafe_code)] use crate::error::*; -use crate::graphics_permanent::{ +use crate::graphics::permanent::{ PermanentGraphicsState, GraphicsStateForReinit, QueueFamilyIndices, EnableAnisotropy }; @@ -870,7 +870,7 @@ fn init_texture(instance: &Instance, queue: &vk::Queue, command_pool: &vk::CommandPool) -> Result<(vk::Image, vk::DeviceMemory, vk::ImageView, u32)> { - let png = include_bytes!("../textures/forest_leaves_04_diff.png"); + let png = include_bytes!("../../textures/forest_leaves_04_diff.png"); let decoder = Decoder::new(Cursor::new(png)); let mut reader = decoder.read_info()?; diff --git a/src/main.rs b/src/main.rs index 10b203a..2078dec 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,10 @@ #![deny(unsafe_code)] use crate::error::*; -use crate::graphics_permanent::{ +use crate::graphics::permanent::{ PermanentGraphicsState, GraphicsStateForReinit }; -use crate::graphics_window_dressing::{ +use crate::graphics::scene::generate_scene_commands; +use crate::graphics::window_dressing::{ WindowDressing, RenderState, N_SIMULTANEOUS_FRAMES }; use crate::linear_algebra::{ Vec3, Mat4, Transformation }; @@ -22,9 +23,7 @@ use winit::event_loop::{ ActiveEventLoop, EventLoop }; use winit::window::WindowId; mod error; -mod graphics_permanent; -mod graphics_scene; -mod graphics_window_dressing; +mod graphics; mod linear_algebra; mod model_loader; mod shader_data; @@ -150,7 +149,7 @@ impl Surreality { let time = self.simulation_start.elapsed().as_secs_f32(); - let command_buffer = crate::graphics_scene::generate_scene_commands( + let command_buffer = generate_scene_commands( image_index, time, &render_state, device, &window_dressing.swapchain.extent)?; |