Enum vulkano::pipeline::graphics::viewport::ViewportState [−][src]
pub enum ViewportState {
Fixed {
data: Vec<(Viewport, Scissor)>,
},
FixedViewport {
viewports: Vec<Viewport>,
scissor_count_dynamic: bool,
},
FixedScissor {
scissors: Vec<Scissor>,
viewport_count_dynamic: bool,
},
Dynamic {
count: u32,
viewport_count_dynamic: bool,
scissor_count_dynamic: bool,
},
}
Expand description
List of viewports and scissors that are used when creating a graphics pipeline object.
Note that the number of viewports and scissors must be the same.
Variants
Fixed
The state is known in advance.
FixedViewport
Fields
scissor_count_dynamic: bool
Sets whether the scissor count is also dynamic, or only the scissors themselves.
If set to true
, the
extended_dynamic_state
feature must
be enabled on the device.
The state of viewports is known in advance, but the state of scissors is dynamic and will be set when drawing.
FixedScissor
Fields
viewport_count_dynamic: bool
Sets whether the viewport count is also dynamic, or only the viewports themselves.
If set to true
, the
extended_dynamic_state
feature must
be enabled on the device.
The state of scissors is known in advance, but the state of viewports is dynamic and will be set when drawing.
Dynamic
Fields
count: u32
Number of viewports and scissors.
This is ignored if both viewport_count_dynamic
and scissor_count_dynamic
are true
.
viewport_count_dynamic: bool
Sets whether the viewport count is also dynamic, or only the viewports themselves.
If set to true
, the
extended_dynamic_state
feature must
be enabled on the device.
scissor_count_dynamic: bool
Sets whether the scissor count is also dynamic, or only the scissors themselves.
If set to true
, the
extended_dynamic_state
feature must
be enabled on the device.
The state of both the viewports and scissors is dynamic and will be set when drawing.
Implementations
pub fn viewport_fixed_scissor_fixed(
data: impl IntoIterator<Item = (Viewport, Scissor)>
) -> Self
pub fn viewport_fixed_scissor_fixed(
data: impl IntoIterator<Item = (Viewport, Scissor)>
) -> Self
Creates a ViewportState
with fixed state from the given viewports and scissors.
Creates a ViewportState
with fixed state from the given viewports, and matching scissors
that cover the whole viewport.
Creates a ViewportState
with dynamic viewport, and a single scissor that always covers
the whole viewport.
Creates a ViewportState
with dynamic viewports and scissors, but a fixed count.
Creates a ViewportState
with dynamic viewport count and scissor count.
Trait Implementations
Returns ViewportState::new()
.
Auto Trait Implementations
impl RefUnwindSafe for ViewportState
impl Send for ViewportState
impl Sync for ViewportState
impl Unpin for ViewportState
impl UnwindSafe for ViewportState
Blanket Implementations
Mutably borrows from an owned value. Read more
Builds a pointer to this type from a raw pointer.
Returns true if the size is suitable to store a type like this.
Returns the size of an individual element.