mirror of
https://github.com/lisk77/comet.git
synced 2025-12-12 17:18:50 +00:00
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:
parent
4ada207b3b
commit
2736d97d03
23 changed files with 1479 additions and 692 deletions
29
crates/comet_renderer/src/render_pass.rs
Normal file
29
crates/comet_renderer/src/render_pass.rs
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue