feat: implement a more modular graphics pipeline
This commit is contained in:
1 parent
6fe8ff2af0
commit
8b76fdb6ae
15 files changed
+498
-85
No files matched your search
+9
-3
@@ -6,12 +6,18 @@ use vulkano::pipeline::graphics::vertex_input::Vertex;
|
||||
pub struct Vertex3 {
|
||||
#[format(R32G32B32_SFLOAT)]
|
||||
pub(crate) position: [f32; 3],
|
||||
#[format(R32G32B32_SFLOAT)]
|
||||
pub(crate) normal: [f32; 3],
|
||||
}
|
||||
|
||||
impl From<[f32; 3]> for Vertex3 {
|
||||
fn from(v: [f32; 3]) -> Self {
|
||||
impl Vertex3 {
|
||||
pub fn new(
|
||||
position: [f32; 3],
|
||||
normal: [f32; 3],
|
||||
) -> Self {
|
||||
Self {
|
||||
position: v.clone(),
|
||||
position,
|
||||
normal,
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user