pub struct GlGraphics { /* fields omitted */ }
Try to get uniform from the current shader of a given name.
Creates a new OpenGL back-end.
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.
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.
pub fn draw<F, U>(&mut self, viewport: Viewport, f: F) -> U where F: FnOnce(Context, &mut Self) -> U, | [src] |
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.
The texture type associated with the back-end. 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 tweened polygon using linear interpolation. Read more
fn image( &mut self, image: &Image, texture: &Self::Texture, draw_state: &DrawState, transform: [[f64; 3]; 2] ) | |
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
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
.