[−][src]Trait candelabre_windowing::CandlWindow
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
Provided methods
fn init<T>(
el: &EventLoopWindowTarget<T>,
video_mode: VideoMode,
dim: CandlDimension,
title: &str,
options: CandlOptions
) -> Result<WindowedContext<PossiblyCurrent>, CandlError> where
T: 'static,
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
Implementors
impl<R, D, M> CandlWindow for CandlSurface<R, D, M> where
R: CandlRenderer<R, D, M>,
D: CandlUpdate<M>,
[src]
R: CandlRenderer<R, D, M>,
D: CandlUpdate<M>,
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