[][src]Struct glium_graphics::GliumGraphics

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

Graphics back-end.

Methods

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

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

Clears background with a color.

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

Renders list of 2d triangles.

fn tri_list_uv<F>(
    &mut self,
    draw_state: &DrawState,
    color: &[f32; 4],
    texture: &Texture,
    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.

fn rectangle<R>(
    &mut self,
    r: &Rectangle,
    rectangle: R,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2]
) where
    R: Into<[f64; 4]>, 

Draws a rectangle. Read more

fn polygon(
    &mut self,
    p: &Polygon,
    polygon: &[[f64; 2]],
    draw_state: &DrawState,
    transform: [[f64; 3]; 2]
)

Draws a polygon. Read more

fn polygon_tween_lerp(
    &mut self,
    p: &Polygon,
    polygons: &[&[[f64; 2]]],
    tween_factor: f64,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2]
)

Draws a tweened polygon using linear interpolation. Read more

fn image(
    &mut self,
    image: &Image,
    texture: &Self::Texture,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2]
)

Draws image. Read more

fn ellipse<R>(
    &mut self,
    e: &Ellipse,
    rectangle: R,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2]
) where
    R: Into<[f64; 4]>, 

Draws ellipse. Read more

fn line<L>(
    &mut self,
    l: &Line,
    line: L,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2]
) where
    L: Into<[f64; 4]>, 

Draws line. Read more

fn circle_arc<R>(
    &mut self,
    c: &CircleArc,
    rectangle: R,
    draw_state: &DrawState,
    transform: [[f64; 3]; 2]
) where
    R: Into<[f64; 4]>, 

Draws circle arc. Read more

Auto Trait Implementations

impl<'d, 's, S> Unpin for GliumGraphics<'d, 's, S>

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

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

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

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

Blanket Implementations

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

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

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.

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

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

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

impl<T> Erased for T

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.