#[non_exhaustive]#[repr(u8)]pub enum RenderingState {
RenderingSetup = 0,
BeforeRendering = 1,
AfterRendering = 2,
RenderingTeardown = 3,
}
Expand description
This enum describes the different rendering states, that will be provided
to the parameter of the callback for set_rendering_notifier
on the slint::Window
.
When OpenGL is used for rendering, the context will be current.
It’s safe to call OpenGL functions, but it is crucial that the state of the context is
preserved. So make sure to save and restore state such as TEXTURE_BINDING_2D
or
ARRAY_BUFFER_BINDING
perfectly.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RenderingSetup = 0
The window has been created and the graphics adapter/context initialized.
BeforeRendering = 1
The scene of items is about to be rendered.
AfterRendering = 2
The scene of items was rendered, but the back buffer was not sent for display presentation yet (for example GL swap buffers).
RenderingTeardown = 3
The window will be destroyed and/or graphics resources need to be released due to other constraints.
Trait Implementations§
Source§impl Clone for RenderingState
impl Clone for RenderingState
Source§fn clone(&self) -> RenderingState
fn clone(&self) -> RenderingState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more