Simplify triangle example's vertex input state (#512)

Co-authored-by: Steve Wooster <s.f.m.wooster@gmail.com>
This commit is contained in:
Steve Wooster 2021-12-19 03:28:34 -08:00 committed by GitHub
parent 428830ad4f
commit ea65db4bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -263,13 +263,9 @@ fn main() {
}, },
]; ];
let vertex_input_state_info = vk::PipelineVertexInputStateCreateInfo { let vertex_input_state_info = vk::PipelineVertexInputStateCreateInfo::builder()
vertex_attribute_description_count: vertex_input_attribute_descriptions.len() as u32, .vertex_attribute_descriptions(&vertex_input_attribute_descriptions)
p_vertex_attribute_descriptions: vertex_input_attribute_descriptions.as_ptr(), .vertex_binding_descriptions(&vertex_input_binding_descriptions);
vertex_binding_description_count: vertex_input_binding_descriptions.len() as u32,
p_vertex_binding_descriptions: vertex_input_binding_descriptions.as_ptr(),
..Default::default()
};
let vertex_input_assembly_state_info = vk::PipelineInputAssemblyStateCreateInfo { let vertex_input_assembly_state_info = vk::PipelineInputAssemblyStateCreateInfo {
topology: vk::PrimitiveTopology::TRIANGLE_LIST, topology: vk::PrimitiveTopology::TRIANGLE_LIST,
..Default::default() ..Default::default()