pub enum RenderAction {
Show 25 variants SetTransform(Matrix), CreateVertex2DBuffer(VertexBufferId, Vec<Vertex2D, Global>), CreateIndexBuffer(IndexBufferId, Vec<u16, Global>), FreeVertexBuffer(VertexBufferId), FreeIndexBuffer(IndexBufferId), BlendMode(BlendMode), CreateRenderTarget(RenderTargetId, TextureId, usize, usize, RenderTargetType), FreeRenderTarget(RenderTargetId), SelectRenderTarget(RenderTargetId), RenderToFrameBuffer, ShowFrameBuffer, DrawFrameBuffer(RenderTargetId, i32, i32), CreateTextureBgra(TextureId, usize, usize), CreateTextureMono(TextureId, usize, usize), Create1DTextureBgra(TextureId, usize), Create1DTextureMono(TextureId, usize), WriteTextureData(TextureId, (usize, usize), (usize, usize), Arc<Vec<u8, Global>>), WriteTexture1D(TextureId, usize, usize, Arc<Vec<u8, Global>>), CreateMipMaps(TextureId), CopyTexture(TextureId, TextureId), FreeTexture(TextureId), Clear(Rgba8), UseShader(ShaderType), DrawTriangles(VertexBufferId, Range<usize>), DrawIndexedTriangles(VertexBufferId, IndexBufferId, usize),
}
Expand description

Represents an action for a render target

Variants§

§

SetTransform(Matrix)

Sets the transformation matrix to use for future renderings

§

CreateVertex2DBuffer(VertexBufferId, Vec<Vertex2D, Global>)

Creates a vertex buffer with the specified 2D vertices in it (replacing any existing buffer)

§

CreateIndexBuffer(IndexBufferId, Vec<u16, Global>)

Creates an index buffer with the specified 2D vertices in it (replacing any existing buffer)

§

FreeVertexBuffer(VertexBufferId)

Frees an existing vertex buffer

§

FreeIndexBuffer(IndexBufferId)

Frees an existing index buffer

§

BlendMode(BlendMode)

Sets the blend mode for future drawing operations (SourceOver is the default)

§

CreateRenderTarget(RenderTargetId, TextureId, usize, usize, RenderTargetType)

Creates a new render target of the specified size, as the specified texture

§

FreeRenderTarget(RenderTargetId)

Frees up an existing render target

§

SelectRenderTarget(RenderTargetId)

Send future rendering instructions to the specified render target

§

RenderToFrameBuffer

Send future rendering instructions to the main frame buffer

§

ShowFrameBuffer

Display the current frame buffer on-screen

§

DrawFrameBuffer(RenderTargetId, i32, i32)

Renders the specified framebuffer to the current framebuffer

§

CreateTextureBgra(TextureId, usize, usize)

Creates an 8-bit BGRA 2D texture of the specified size

§

CreateTextureMono(TextureId, usize, usize)

Creates an 8-bit monochrome 2D texture of the specified size

§

Create1DTextureBgra(TextureId, usize)

Creates a 1 dimensional 8-bit BGRA texture of the specified size

§

Create1DTextureMono(TextureId, usize)

Creates a 1 dimensional 8-bit monochrome texture of the specified size

§

WriteTextureData(TextureId, (usize, usize), (usize, usize), Arc<Vec<u8, Global>>)

Given a region in a 2D texture and a set of bytes to write, updates the texture with those bytes

§

WriteTexture1D(TextureId, usize, usize, Arc<Vec<u8, Global>>)

Given a region in a 1D texture and a set of bytes to write, updates the texture with those bytes

§

CreateMipMaps(TextureId)

Generates mip-maps for the specified texture ID

§

CopyTexture(TextureId, TextureId)

Copies a texture from a source ID to a target ID (replacing any existing texture at that ID)

Mipmap levels are not copied by this operation, so would need to be regenerated

§

FreeTexture(TextureId)

Frees up an existing texture

§

Clear(Rgba8)

Clears the current render target to the specified colour

§

UseShader(ShaderType)

Uses the specified shader

§

DrawTriangles(VertexBufferId, Range<usize>)

Renders triangles from a vertex buffer (with no texture)

Parameters are the range of vertices to use

§

DrawIndexedTriangles(VertexBufferId, IndexBufferId, usize)

Renders triangles using an index buffer

Trait Implementations§

source§

impl Clone for RenderAction

source§

fn clone(&self) -> RenderAction

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 RenderAction

source§

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

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

impl PartialEq<RenderAction> for RenderAction

source§

fn eq(&self, other: &RenderAction) -> 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 StructuralPartialEq for RenderAction

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,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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> 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.
const: unstable · 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.
const: unstable · source§

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

Performs the conversion.