pub enum ViewportClass {
Root,
Deferred,
Immediate,
EmbeddedWindow,
}Expand description
The different types of viewports supported by egui.
Variants§
Root
The root viewport; i.e. the original window.
Deferred
A viewport run independently from the parent viewport.
This is the preferred type of viewport from a performance perspective.
Create these with crate::Context::show_viewport_deferred.
Immediate
A viewport run inside the parent viewport.
This is the easier type of viewport to use, but it is less performant at it requires both parent and child to repaint if any one of them needs repainting, which effectively produces double work for two viewports, and triple work for three viewports, etc.
Create these with crate::Context::show_viewport_immediate.
EmbeddedWindow
The fallback, when the egui integration doesn’t support viewports,
or crate::Context::embed_viewports is set to true.
If you get this, it is because you are already wrapped in a crate::Window
inside of the parent viewport.
Trait Implementations§
Source§impl Clone for ViewportClass
impl Clone for ViewportClass
Source§fn clone(&self) -> ViewportClass
fn clone(&self) -> ViewportClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more