Use trait instead to get load_fn and add name for pipeline
This commit is contained in:
parent
6099a3e27f
commit
2300c25603
4 changed files with 35 additions and 14 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue