Struct glium_graphics::GliumGraphics
source · pub struct GliumGraphics<'d, 's, S: 's> { /* private fields */ }
Expand description
Graphics back-end.
Implementations§
source§impl<'d, 's, S: Surface> GliumGraphics<'d, 's, S>
impl<'d, 's, S: Surface> GliumGraphics<'d, 's, S>
sourcepub fn new(
system: &'d mut Glium2d,
surface: &'s mut S
) -> GliumGraphics<'d, 's, S>
pub fn new( system: &'d mut Glium2d, surface: &'s mut S ) -> GliumGraphics<'d, 's, S>
Creates a new graphics object.
Trait Implementations§
source§impl<'d, 's, S: Surface> Graphics for GliumGraphics<'d, 's, S>
impl<'d, 's, S: Surface> Graphics for GliumGraphics<'d, 's, S>
Implemented by all graphics back-ends.
source§fn clear_color(&mut self, color: [f32; 4])
fn clear_color(&mut self, color: [f32; 4])
Clears background with a color.
source§fn tri_list<F>(&mut self, draw_state: &DrawState, color: &[f32; 4], f: F)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]])),
fn tri_list<F>(&mut self, draw_state: &DrawState, color: &[f32; 4], f: F)where F: FnMut(&mut dyn FnMut(&[[f32; 2]])),
Renders list of 2d triangles.
source§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]])),
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]])),
Renders list of 2d triangles.
A texture coordinate is assigned per vertex. The texture coordinates refers to the current texture.
source§fn clear_stencil(&mut self, value: u8)
fn clear_stencil(&mut self, value: u8)
Clears stencil buffer with a value, usually 0. Read more
source§fn tri_list_c<F>(&mut self, draw_state: &DrawState, f: F)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 4]])),
fn tri_list_c<F>(&mut self, draw_state: &DrawState, f: F)where F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 4]])),
Same as
tri_list
, but with individual vertex colors. Read moresource§fn tri_list_uv_c<F>(&mut self, draw_state: &DrawState, texture: &Texture, f: F)where
F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]], &[[f32; 4]])),
fn tri_list_uv_c<F>(&mut self, draw_state: &DrawState, texture: &Texture, f: F)where F: FnMut(&mut dyn FnMut(&[[f32; 2]], &[[f32; 2]], &[[f32; 4]])),
Same as
tri_list_uv
, but with individual vertex colors. Read moresource§fn rectangle<R>(
&mut self,
r: &Rectangle,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
R: Into<[f64; 4]>,
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
source§fn polygon(
&mut self,
p: &Polygon,
polygon: &[[f64; 2]],
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
fn polygon( &mut self, p: &Polygon, polygon: &[[f64; 2]], draw_state: &DrawState, transform: [[f64; 3]; 2] )
Draws a polygon. Read more
source§fn polygon_tween_lerp(
&mut self,
p: &Polygon,
polygons: &[&[[f64; 2]]],
tween_factor: f64,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
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
source§fn image(
&mut self,
image: &Image,
texture: &Self::Texture,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)
fn image( &mut self, image: &Image, texture: &Self::Texture, draw_state: &DrawState, transform: [[f64; 3]; 2] )
Draws image. Read more
source§fn ellipse<R>(
&mut self,
e: &Ellipse,
rectangle: R,
draw_state: &DrawState,
transform: [[f64; 3]; 2]
)where
R: Into<[f64; 4]>,
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