[][src]Struct glium_graphics::GliumGraphics

pub struct GliumGraphics<'d, 's, S: 's> { /* fields omitted */ }

Graphics back-end.

Implementations

impl<'d, 's, S: Surface> GliumGraphics<'d, 's, S>[src]

pub fn new(
    system: &'d mut Glium2d,
    surface: &'s mut S
) -> GliumGraphics<'d, 's, S>
[src]

Creates a new graphics object.

Trait Implementations

impl<'d, 's, S: Surface> Graphics for GliumGraphics<'d, 's, S>[src]

Implemented by all graphics back-ends.

type Texture = Texture

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

pub fn clear_color(&mut self, color: [f32; 4])[src]

Clears background with a color.

pub fn tri_list<F>(
    &mut self,
    draw_state: &DrawState,
    color: &[f32; 4],
    mut f: F
) where
    F: FnMut(&mut dyn FnMut(&[[f32; 2]])), 
[src]

Renders list of 2d triangles.

pub fn tri_list_uv<F>(
    &mut self,
    draw_state: &DrawState,
    color: &[f32; 4],
    texture: &Texture,
    mut f: F
) where
    F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]])), 
[src]

Renders list of 2d triangles.

A texture coordinate is assigned per vertex. The texture coordinates refers to the current texture.

Auto Trait Implementations

impl<'d, 's, S> !RefUnwindSafe for GliumGraphics<'d, 's, S>[src]

impl<'d, 's, S> !Send for GliumGraphics<'d, 's, S>[src]

impl<'d, 's, S> !Sync for GliumGraphics<'d, 's, S>[src]

impl<'d, 's, S> Unpin for GliumGraphics<'d, 's, S>[src]

impl<'d, 's, S> !UnwindSafe for GliumGraphics<'d, 's, S>[src]

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

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.