[][src]Trait candelabre_windowing::CandlWindow

pub trait CandlWindow {
    fn ctx(&mut self) -> CandlCurrentWrapper;
fn ctx_ref(&self) -> &CandlCurrentWrapper;
fn set_ctx(&mut self, nctx: CandlCurrentWrapper);
fn resize(&mut self, nsize: PhysicalSize<u32>);
fn swap_buffers(&mut self); fn init<T>(
        el: &EventLoopWindowTarget<T>,
        video_mode: VideoMode,
        dim: CandlDimension,
        title: &str,
        options: CandlOptions
    ) -> Result<WindowedContext<PossiblyCurrent>, CandlError>
    where
        T: 'static
, { ... } }

Window trait

This trait can be used to create a new kind of CandlSurface, with a deeper connection with your code.

Required methods

fn ctx(&mut self) -> CandlCurrentWrapper

get the OpenGL context wrapper

fn ctx_ref(&self) -> &CandlCurrentWrapper

get a reference to the OpenGL context wrapper

fn set_ctx(&mut self, nctx: CandlCurrentWrapper)

change the OpenGL context

fn resize(&mut self, nsize: PhysicalSize<u32>)

handle resize event

fn swap_buffers(&mut self)

swap the buffer

Loading content...

Provided methods

fn init<T>(
    el: &EventLoopWindowTarget<T>,
    video_mode: VideoMode,
    dim: CandlDimension,
    title: &str,
    options: CandlOptions
) -> Result<WindowedContext<PossiblyCurrent>, CandlError> where
    T: 'static, 

code to init the basis of a window with an OpenGL context

Loading content...

Implementors

impl<R, D, M> CandlWindow for CandlSurface<R, D, M> where
    R: CandlRenderer<R, D, M>,
    D: CandlUpdate<M>, 
[src]

fn ctx(&mut self) -> CandlCurrentWrapper[src]

get the OpenGL context from the surface

fn ctx_ref(&self) -> &CandlCurrentWrapper[src]

get the reference to the OpenGL context

fn set_ctx(&mut self, nctx: CandlCurrentWrapper)[src]

change the OpenGL context (make current or not current)

fn swap_buffers(&mut self)[src]

swap the OpenGL back buffer and current buffer

fn resize(&mut self, nsize: PhysicalSize<u32>)[src]

handle resize event

Loading content...