mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +00:00
Add shortcut function for the triangle_list IA
This commit is contained in:
parent
705de7671d
commit
4f19f00469
@ -175,11 +175,7 @@ fn main() {
|
||||
|
||||
|
||||
let pipeline = {
|
||||
let ia = vulkano::pipeline::input_assembly::InputAssembly {
|
||||
topology: vulkano::pipeline::input_assembly::PrimitiveTopology::TriangleList,
|
||||
primitive_restart_enable: false,
|
||||
};
|
||||
|
||||
let ia = vulkano::pipeline::input_assembly::InputAssembly::triangle_list();
|
||||
let raster = Default::default();
|
||||
let ms = vulkano::pipeline::multisample::Multisample::disabled();
|
||||
let blend = vulkano::pipeline::blend::Blend {
|
||||
|
@ -163,11 +163,7 @@ fn main() {
|
||||
}.unwrap();
|
||||
|
||||
let pipeline = {
|
||||
let ia = vulkano::pipeline::input_assembly::InputAssembly {
|
||||
topology: vulkano::pipeline::input_assembly::PrimitiveTopology::TriangleList,
|
||||
primitive_restart_enable: false,
|
||||
};
|
||||
|
||||
let ia = vulkano::pipeline::input_assembly::InputAssembly::triangle_list();
|
||||
let raster = Default::default();
|
||||
let ms = vulkano::pipeline::multisample::Multisample::disabled();
|
||||
let blend = vulkano::pipeline::blend::Blend {
|
||||
|
@ -19,6 +19,17 @@ pub struct InputAssembly {
|
||||
pub primitive_restart_enable: bool,
|
||||
}
|
||||
|
||||
impl InputAssembly {
|
||||
/// Builds an `InputAssembly` struct with the `TriangleList` topology.
|
||||
#[inline]
|
||||
pub fn triangle_list() -> InputAssembly {
|
||||
InputAssembly {
|
||||
topology: PrimitiveTopology::TriangleList,
|
||||
primitive_restart_enable: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Describes how vertices must be grouped together to form primitives.
|
||||
///
|
||||
/// Note that some topologies don't support primitive restart.
|
||||
|
Loading…
Reference in New Issue
Block a user