Struct glium::Frame
[−]
[src]
pub struct Frame {
// some fields omitted
}Implementation of Surface, targeting the default framebuffer.
The back- and front-buffers are swapped when you call finish.
You must call either finish or set_finish or else the destructor will panic.
Methods
impl Frame
fn new(context: Rc<Context>, dimensions: (u32, u32)) -> Frame
Builds a new Frame. Use the draw function on Display instead of this function.
fn finish(self) -> Result<(), SwapBuffersError>
Stop drawing, swap the buffers, and consume the Frame.
See the documentation of SwapBuffersError about what is being returned.
fn set_finish(&mut self) -> Result<(), SwapBuffersError>
Stop drawing, swap the buffers.
The Frame can now be dropped regularly. Calling finish() or set_finish() again will
cause Err(SwapBuffersError::AlreadySwapped) to be returned.