diff --git a/src/main.rs b/src/main.rs index 6c01c40..4c3f414 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,7 @@ use std::error::Error; use winit::event_loop::{ControlFlow, EventLoop}; mod renderer; +mod vulkano; fn main() -> Result<(), impl Error> { env_logger::init(); diff --git a/src/vulkano/context.rs b/src/vulkano/context.rs new file mode 100644 index 0000000..b4b5753 --- /dev/null +++ b/src/vulkano/context.rs @@ -0,0 +1,12 @@ +use crate::vulkano::queues::Queues; +use std::sync::Arc; +use vulkano::device::Device; +use vulkano::instance::Instance; +use vulkano::memory::allocator::StandardMemoryAllocator; + +struct Context { + instance: Arc, + device: Arc, + queues: Queues, + memory_allocator: Arc, +} diff --git a/src/vulkano/mod.rs b/src/vulkano/mod.rs new file mode 100644 index 0000000..3d6d8f1 --- /dev/null +++ b/src/vulkano/mod.rs @@ -0,0 +1,3 @@ +pub mod context; +pub mod queues; +mod renderer; diff --git a/src/vulkano/queues.rs b/src/vulkano/queues.rs new file mode 100644 index 0000000..c602a2a --- /dev/null +++ b/src/vulkano/queues.rs @@ -0,0 +1,8 @@ +use std::sync::Arc; +use vulkano::device::Queue; + +pub struct Queues { + graphics_queue: Arc, + compute_queue: Arc, + transfer_queue: Option>, +} diff --git a/src/vulkano/renderer.rs b/src/vulkano/renderer.rs new file mode 100644 index 0000000..e69de29