[][src]Struct leafrender::render::glutin::drawer::GlutinDrawer

pub struct GlutinDrawer {
    pub events_loop: EventsLoop,
    pub gl_window: WindowedContext<PossiblyCurrent>,
    // some fields omitted
}

Fields

events_loop: EventsLoopgl_window: WindowedContext<PossiblyCurrent>

Trait Implementations

impl Drawer for GlutinDrawer[src]

type NativeTexture = GlTexture

fn end(&mut self)[src]

Ends this frame.

fn clear(&mut self, transparent: bool)[src]

Clears the framebuffer.

fn enable_blending(&mut self)[src]

Enables blending of alpha textures. Disabled at end of frame.

fn get_width(&self) -> usize[src]

Returns the width of the screen.

fn get_height(&self) -> usize[src]

Returns the height of the screen.

fn set_background(&mut self, image: DynamicImage)[src]

Uses the specified image as a background. This is provided as several platforms have ways to accelerate this beyond OpenGL calls.

fn set_brightness(&mut self, _val: u8) -> Result<()>[src]

Sets the brightness of the screen.

fn draw_textured_vertices_colored_uv(
    &mut self,
    texture: &Self::NativeTexture,
    vertices: &[f32],
    colors: &[f32],
    uv: &[f32]
)
[src]

Draws a texture to the screen, with a specified set of vertices to draw to, a UV to decode the image with, and a color to use as a base.

fn draw_colored_vertices(&mut self, vertices: &[f32], colors: &[f32])[src]

Draws a set of colored vertices to the screen, with a specified color array.

fn draw_textured_vertices_colored(
    &mut self,
    texture: &Self::NativeTexture,
    vertices: &[f32],
    colors: &[f32]
)
[src]

Draws a texture to the screen, with a specified set of vertices to draw to, and a color to use as a base. Read more

fn draw_textured_vertices(
    &mut self,
    texture: &Self::NativeTexture,
    vertices: &[f32]
)
[src]

Draws a texture to the screen, with a specified set of vertices to draw to, and a default UV. Read more

fn draw_texture_sized(
    &mut self,
    texture: &Self::NativeTexture,
    rect: &Rect,
    color: &Color
)
[src]

Draws a texture to the screen, with the specified x/y coordinates (relative to screen size), and a specified width/height. Read more

fn draw_texture_colored(
    &mut self,
    texture: &Self::NativeTexture,
    pos: &Position,
    color: &Color
)
[src]

Draws a texture to the screen, with the specified x/y coordinates (relative to screen size), and the texture dimensions as width/height. Read more

fn draw_texture(&mut self, texture: &Self::NativeTexture, pos: &Position)[src]

Draws a texture to the screen, with the specified x/y coordinates (relative to screen size), and the texture dimensions as width/height. Read more

fn draw_colored_rect(&mut self, rect: &Rect, color: &Color)[src]

Draws a colored rectangle to the screen, with a single color.

fn rect_to_vertices(&self, rect: &Rect) -> [f32; 12][src]

Converts a rectangle to 4 vertices

Auto Trait Implementations

impl !Send for GlutinDrawer

impl !Sync for GlutinDrawer

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> 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.

impl<T> Erased for T