Struct opengl_graphics::GlGraphics[][src]

pub struct GlGraphics { /* fields omitted */ }

Contains OpenGL data.

Methods

impl GlGraphics
[src]

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

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.

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.

Sets viewport with normalized coordinates and center as origin.

Returns the current program

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.

Setup that should be called at the start of a frame's draw call.

Finalize the frame's draw calls.

Convenience for wrapping draw calls with the begin and end methods.

This is preferred over using the draw_begin & draw_end methods explicitly but may be less flexible.

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

Auto Trait Implementations

impl Send for GlGraphics

impl Sync for GlGraphics