Struct opengl_graphics::GlGraphics [] [src]

pub struct GlGraphics { /* fields omitted */ }

Contains OpenGL data.

Methods

impl<'a> GlGraphics
[src]

Creates a new OpenGL back-end.

Panics

If the OpenGL function pointers have not been loaded yet. See https://github.com/PistonDevelopers/opengl_graphics/issues/103 for more info.

Sets viewport with normalized coordinates and center as origin.

Sets the current program only if the program is not in use.

Unset the current program.

This forces the current program to be set on next drawing call.

Sets the current draw state, by detecting changes.

Unsets the current draw state.

This forces the current draw state to be set on next drawing call.

Draws graphics.

Assume all textures has alpha channel for now.

Trait Implementations

impl Graphics for GlGraphics
[src]

The texture type associated with the back-end. Read more

Clears background with a color. Read more

Clears stencil buffer with a value, usually 0. Read more

Renders list of 2d triangles using a solid color. Read more

Renders list of 2d triangles using a color and a texture. Read more

Draws a rectangle. Read more

Draws a polygon. Read more

Draws a tweened polygon using linear interpolation. Read more

Draws image. Read more

Draws ellipse. Read more

Draws line. Read more

Draws circle arc. Read more

Draws deformed image. Read more