Struct mini_gl_fb::MiniGlFb [−][src]
pub struct MiniGlFb { pub internal: Internal, }
Main wrapper type.
Any fields accessed through internal
are not considered a public API and may be subject to
breaking API changes. Only access this field as a last resort if the MiniGlFb API fails
to fit your exact use case.
Public methods of Internal
are considered stable, but may be more complicated to use.
Basic Usage
See the update_buffer
and persist
methods.
Fields
internal: Internal
Methods
impl MiniGlFb
[src]
impl MiniGlFb
pub fn update_buffer<T>(&mut self, image_data: &[T])
[src]
pub fn update_buffer<T>(&mut self, image_data: &[T])
Updates the backing buffer and draws immediately (swaps buffers).
The main drawing function.
pub fn persist(&mut self)
[src]
pub fn persist(&mut self)
Keeps the window open until the user closes it.
pub fn persist_and_redraw(&mut self, redraw: bool)
[src]
pub fn persist_and_redraw(&mut self, redraw: bool)
persist
implementation.
When redraw is true, redraws as fast as possible. This function is primarily for debugging.
pub fn glutin_breakout(self) -> GlutinBreakout
[src]
pub fn glutin_breakout(self) -> GlutinBreakout
Need full access to Glutin's event handling? No problem!
Hands you the event loop and the window we created, so you can handle events however you want, and the Framebuffer, so you can still draw easily!
IMPORTANT: You should make sure to render something before swapping buffers or the
window may flash violently. You can call fb.redraw()
directly before if you are unsure
that an OpenGL draw call was issued. fb.update_buffer
will typically issue a draw call.