Struct opengl_graphics::GlGraphics [] [src]

pub struct GlGraphics { /* fields omitted */ }

Contains OpenGL data.

Methods

impl GlGraphics
[src]

[src]

Try to get uniform from the current shader of a given name.

impl<'a> GlGraphics
[src]

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

[src]

Create a new OpenGL back-end with Colored and Textured structs to describe how to render objects.

Panics

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

[src]

Sets viewport with normalized coordinates and center as origin.

[src]

Returns the current program

[src]

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

[src]

Unset the current program.

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

[src]

Sets the current draw state, by detecting changes.

[src]

Unsets the current draw state.

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

[src]

Draws graphics.

[src]

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

[src]

Clears background with a color. Read more

[src]

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

[src]

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

[src]

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

[src]

Draws a rectangle. Read more

[src]

Draws a polygon. Read more

[src]

Draws a tweened polygon using linear interpolation. Read more

[src]

Draws image. Read more

[src]

Draws ellipse. Read more

[src]

Draws line. Read more

[src]

Draws circle arc. Read more

[src]

Draws deformed image. Read more