Begin rework vulkano model structure
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 20m36s

This commit is contained in:
Florian RICHER 2025-03-25 13:45:34 +01:00
parent 1c24a05200
commit 63f16975b9
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
5 changed files with 24 additions and 0 deletions

View file

@ -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();

12
src/vulkano/context.rs Normal file
View file

@ -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<Instance>,
device: Arc<Device>,
queues: Queues,
memory_allocator: Arc<StandardMemoryAllocator>,
}

3
src/vulkano/mod.rs Normal file
View file

@ -0,0 +1,3 @@
pub mod context;
pub mod queues;
mod renderer;

8
src/vulkano/queues.rs Normal file
View file

@ -0,0 +1,8 @@
use std::sync::Arc;
use vulkano::device::Queue;
pub struct Queues {
graphics_queue: Arc<Queue>,
compute_queue: Arc<Queue>,
transfer_queue: Option<Arc<Queue>>,
}

0
src/vulkano/renderer.rs Normal file
View file