Add default impl for bindings trait function
This commit is contained in:
parent
1a7e31e1d3
commit
e62853ad61
1 changed files with 8 additions and 1 deletions
|
@ -52,7 +52,14 @@ impl Default for ShaderType {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait VertexInputDescription: ReprC {
|
pub trait VertexInputDescription: ReprC {
|
||||||
fn bindings() -> Vec<VkVertexInputBindingDescription>;
|
fn bindings() -> Vec<VkVertexInputBindingDescription> {
|
||||||
|
vec![VkVertexInputBindingDescription {
|
||||||
|
binding: 0,
|
||||||
|
stride: std::mem::size_of::<Self>() as u32,
|
||||||
|
inputRate: VK_VERTEX_INPUT_RATE_VERTEX,
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
|
||||||
fn attributes() -> Vec<VkVertexInputAttributeDescription>;
|
fn attributes() -> Vec<VkVertexInputAttributeDescription>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue