Struct DrawArgs

Source
pub struct DrawArgs {
Show 14 fields pub surface: Surface, pub viewport: Rect<i32>, pub scissor: Option<Rect<i32>>, pub blend_mode: BlendMode, pub depth_test: Option<DepthTest>, pub cull_mode: Option<CullMode>, pub prim_type: PrimType, pub shader: Shader, pub vertices: VertexBuffer, pub uniforms: UniformBuffer, pub vertex_start: u32, pub vertex_end: u32, pub uniform_index: u32, pub instances: i32,
}
Expand description

Arguments for draw.

Fields§

§surface: Surface

Surface to draw on.

§viewport: Rect<i32>

Viewport rectangle.

§scissor: Option<Rect<i32>>

Scissor rectangle.

§blend_mode: BlendMode

Blend mode.

§depth_test: Option<DepthTest>

Depth test.

§cull_mode: Option<CullMode>

Triangle culling mode.

§prim_type: PrimType

Primitive type.

§shader: Shader

Shader used.

§vertices: VertexBuffer

Vertex buffer.

§uniforms: UniformBuffer

Uniforms.

§vertex_start: u32

Index of the first vertex.

§vertex_end: u32

Index of one past the last vertex.

§uniform_index: u32

Index of the uniform to use.

§instances: i32

Number of instances to draw.

If this is less than zero, instanced drawing is disabled.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.