Struct glium_graphics::GliumGraphics
[−]
[src]
pub struct GliumGraphics<'d, 's, S: 's> { /* fields omitted */ }
Graphics back-end.
Methods
impl<'d, 's, S: Surface> GliumGraphics<'d, 's, S>
[src]
fn new(system: &'d mut Glium2d, surface: &'s mut S) -> GliumGraphics<'d, 's, S>
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])
Clears background with a color.
fn clear_stencil(&mut self, value: u8)
Clears stencil buffer with a value, usually 0. Read more
fn tri_list<F>(&mut self, draw_state: &DrawState, color: &[f32; 4], f: F) where F: FnMut(&mut FnMut(&[f32]))
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 FnMut(&[f32], &[f32]))
draw_state: &DrawState,
color: &[f32; 4],
texture: &Texture,
f: F) where F: FnMut(&mut FnMut(&[f32], &[f32]))
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]>
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])
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])
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])
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]>
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]>
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]>
c: &CircleArc,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]) where R: Into<[f64; 4]>
Draws circle arc. Read more
fn deform_image(&mut self,
d: &DeformGrid,
texture: &Self::Texture,
draw_state: &DrawState,
transform: [[f64; 3]; 2])
d: &DeformGrid,
texture: &Self::Texture,
draw_state: &DrawState,
transform: [[f64; 3]; 2])
Draws deformed image. Read more