feat: Added shader loading and swapping as well as beginnings of out of the box noise generation and support for multiple render passes

This commit is contained in:
lisk77 2024-12-17 01:36:34 +01:00
parent 4ada207b3b
commit 2736d97d03
23 changed files with 1479 additions and 692 deletions

View file

@ -0,0 +1,29 @@
use comet_resources::Vertex;
pub struct RenderPassInfo {
shader: &'static str,
vertex_buffer: Vec<Vertex>,
index_buffer: Vec<u16>,
}
impl RenderPassInfo {
pub fn new(shader: &'static str, vertex_buffer: Vec<Vertex>, index_buffer: Vec<u16>) -> Self {
Self {
shader,
vertex_buffer,
index_buffer
}
}
pub fn shader(&self) -> &'static str {
self.shader
}
pub fn vertex_buffer(&self) -> &Vec<Vertex> {
&self.vertex_buffer
}
pub fn index_buffer(&self) -> &Vec<u16> {
&self.index_buffer
}
}