Trait 2dgl::graphics::renderer::Renderer [-]  [+] [src]

pub trait Renderer {
    unsafe fn render_rectangle(&self, position: Vector2<GLfloat>, size: Vector2<GLfloat>);
    unsafe fn init_projection(&self, x: GLint, y: GLint, width: GLuint, height: GLuint);
}

A renderer that can render in two dimensional space

Required Methods

unsafe fn render_rectangle(&self, position: Vector2<GLfloat>, size: Vector2<GLfloat>)

Renders a axis-aligned rectangle using the specified position and dimensions in pixels

unsafe fn init_projection(&self, x: GLint, y: GLint, width: GLuint, height: GLuint)

Initializes the projection/view for the renderer

Implementors