Struct tridify_rs::Window
source · pub struct Window { /* private fields */ }
Expand description
Desktop window representation. Stores it’s own GPU context and render loop.
Implementations§
source§impl Window
impl Window
sourcepub fn render_step(&mut self, frame_ctx: &FrameContext<'_>)
pub fn render_step(&mut self, frame_ctx: &FrameContext<'_>)
Step through render loop once.
sourcepub fn set_render_loop(
&mut self,
func: impl FnMut(&mut WindowView, &FrameContext<'_>) + 'static
)
pub fn set_render_loop( &mut self, func: impl FnMut(&mut WindowView, &FrameContext<'_>) + 'static )
Define closure that will be called each time the window is rendered
pub fn view(&self) -> &WindowView
pub fn view_mut(&mut self) -> &mut WindowView
sourcepub fn time_running(&self) -> Duration
pub fn time_running(&self) -> Duration
Time the window has been running since its creation.