pub enum Command {
Show 32 variants UseProgram(Program), SetModelViewProjection(Matrix4Uniform), SetModel(Matrix4Uniform), SetView(Matrix4Uniform), SetTexture(Texture), SetF32(F32Uniform, f32), SetVector2(Vector2Uniform, Vector2<f32>), SetVector3(Vector3Uniform, Vector3<f32>), SetMatrix4(Matrix4Uniform, Matrix4<f32>), EnableFrameBufferSRGB, DisableFrameBufferSRGB, EnableBlend, DisableBlend, EnableCullFace, DisableCullFace, CullFaceFront, CullFaceBack, CullFaceFrontAndBack, DrawTriangles(VertexArray, usize), DrawTriangleStrip(VertexArray, usize), DrawLines(VertexArray, usize), DrawPoints(VertexArray, usize), Translate(Vector3<f32>), TranslateGlobal(Vector3<f32>), Scale(Vector3<f32>), RotateXDeg(f32), RotateYDeg(f32), RotateZDeg(f32), RotateAxisDeg(Vector3<f32>, f32), PushTransform, PopTransform, Draw(CommandList),
}
Expand description

Stores a scene command.

Variants§

§

UseProgram(Program)

Use program.

§

SetModelViewProjection(Matrix4Uniform)

Set model-view-projection transform.

§

SetModel(Matrix4Uniform)

Set model transform.

§

SetView(Matrix4Uniform)

Set view transform.

§

SetTexture(Texture)

Set texture.

§

SetF32(F32Uniform, f32)

Set f32 uniform.

§

SetVector2(Vector2Uniform, Vector2<f32>)

Set 2D vector uniform.

§

SetVector3(Vector3Uniform, Vector3<f32>)

Set 3D vector uniform.

§

SetMatrix4(Matrix4Uniform, Matrix4<f32>)

Set matrx uniform.

§

EnableFrameBufferSRGB

Enable framebuffer sRGB.

§

DisableFrameBufferSRGB

Disable framebuffer sRGB.

§

EnableBlend

Enable blend.

§

DisableBlend

Disable blend.

§

EnableCullFace

Enable cull face.

§

DisableCullFace

Disable cull face.

§

CullFaceFront

Cull front face.

§

CullFaceBack

Cull back face.

§

CullFaceFrontAndBack

Cull both front and back face.

§

DrawTriangles(VertexArray, usize)

Draw triangles.

§

DrawTriangleStrip(VertexArray, usize)

Draw triangle strip.

§

DrawLines(VertexArray, usize)

Draw lines.

§

DrawPoints(VertexArray, usize)

Draw points.

§

Translate(Vector3<f32>)

Translate model.

§

TranslateGlobal(Vector3<f32>)

Translate model in global coordinates.

§

Scale(Vector3<f32>)

Scale model.

§

RotateXDeg(f32)

Rotate model around x axis with degrees.

§

RotateYDeg(f32)

Rotate model around y axis with degrees.

§

RotateZDeg(f32)

Rotate model around z axis with degrees.

§

RotateAxisDeg(Vector3<f32>, f32)

Rotate model around axis with degrees.

§

PushTransform

Push model transform to transform stack.

§

PopTransform

Pop model transform from transform stack.

§

Draw(CommandList)

Draw a command list.

Trait Implementations§

source§

impl Clone for Command

source§

fn clone(&self) -> Command

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Command

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for Command

source§

fn eq(&self, other: &Command) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for Command

source§

impl StructuralPartialEq for Command

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.