Use trait instead to get load_fn and add name for pipeline

This commit is contained in:
Florian RICHER 2025-06-09 20:53:22 +02:00
parent 6099a3e27f
commit 2300c25603
Signed by: florian.richer
GPG key ID: C73D37CBED7BFC77
4 changed files with 35 additions and 14 deletions

View file

@ -33,13 +33,13 @@ use crate::core::render::{
AsDescriptorSet, AsDescriptorSetLayoutBindings, AsRecordable, AsRenderableMesh,
AsRenderableMeshInstance, mvp::Mvp, transform::TransformRaw, vertex::Vertex3D,
},
resources::texture::Texture,
resources::{pipeline::LoadableGraphicsPipeline, texture::Texture},
};
pub struct SimplePipeline;
impl SimplePipeline {
pub fn new(
impl LoadableGraphicsPipeline for SimplePipeline {
fn load(
device: &Arc<Device>,
swapchain_format: Format,
depth_format: Format,
@ -114,6 +114,10 @@ impl SimplePipeline {
Ok(pipeline)
}
fn pipeline_name() -> &'static str {
"SimplePipeline"
}
}
impl AsRecordable for SimplePipeline {