Struct gfx_graphics::GfxGraphics[][src]

pub struct GfxGraphics<'a, R, C> where
    R: Resources + 'a,
    C: CommandBuffer<R> + 'a,
    R::Buffer: 'a,
    R::Shader: 'a,
    R::Program: 'a,
    R::Texture: 'a,
    R::Sampler: 'a, 
{ pub encoder: &'a mut Encoder<R, C>, // some fields omitted }

Used for rendering 2D graphics.

Fields

encoder: &'a mut Encoder<R, C>

Provide access to the gfx::Encoder in case a user needs to update textures for caching, etc.

Implementations

impl<'a, R, C> GfxGraphics<'a, R, C> where
    R: Resources,
    C: CommandBuffer<R>, 
[src]

pub fn new(
    encoder: &'a mut Encoder<R, C>,
    output_color: &'a RenderTargetView<R, Srgba8>,
    output_stencil: &'a DepthStencilView<R, DepthStencil>,
    g2d: &'a mut Gfx2d<R>
) -> Self
[src]

Creates a new object for rendering 2D graphics.

pub fn has_texture_alpha(&self, texture: &Texture<R>) -> bool where
    R: Resources
[src]

Returns true if texture has alpha channel.

Trait Implementations

impl<'a, R, C> Graphics for GfxGraphics<'a, R, C> where
    R: Resources,
    C: CommandBuffer<R>,
    R::Buffer: 'a,
    R::Shader: 'a,
    R::Program: 'a,
    R::Texture: 'a,
    R::Sampler: 'a, 
[src]

type Texture = Texture<R>

The texture type associated with the back-end. Read more

Auto Trait Implementations

impl<'a, R, C> !RefUnwindSafe for GfxGraphics<'a, R, C>

impl<'a, R, C> Send for GfxGraphics<'a, R, C>

impl<'a, R, C> Sync for GfxGraphics<'a, R, C> where
    C: Sync

impl<'a, R, C> Unpin for GfxGraphics<'a, R, C>

impl<'a, R, C> !UnwindSafe for GfxGraphics<'a, R, C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.