Enum zng_view_api::window::RenderMode
source · pub enum RenderMode {
Dedicated,
Integrated,
Software,
}Expand description
Render backend preference.
This is mostly a trade-off between performance, power consumption and cold startup time.
Variants§
Dedicated
Prefer the best dedicated GPU, probably the best performance after initialization, but also the most power consumption.
Falls back to Integrated, then Software.
Integrated
Prefer the integrated GPU (provided by the CPU), probably the best power consumption and good performance for most GUI applications, this is the default value.
Falls back to Dedicated, then Software.
Software
Use a software render fallback, this has the best compatibility and best initialization time. This is probably the best pick for one frame render tasks and small windows where the initialization time of a GPU context may not offset the render time gains.
If the view-process implementation has no software, falls back to Integrated, then Dedicated.
Implementations§
source§impl RenderMode
impl RenderMode
sourcepub fn fallbacks(self) -> [RenderMode; 2]
pub fn fallbacks(self) -> [RenderMode; 2]
Returns fallbacks that view-process implementers will try if self is not available.
sourcepub fn with_fallbacks(self) -> [RenderMode; 3]
pub fn with_fallbacks(self) -> [RenderMode; 3]
Returns self plus fallbacks.
Trait Implementations§
source§impl Clone for RenderMode
impl Clone for RenderMode
source§fn clone(&self) -> RenderMode
fn clone(&self) -> RenderMode
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for RenderMode
impl Debug for RenderMode
source§impl<'de> Deserialize<'de> for RenderMode
impl<'de> Deserialize<'de> for RenderMode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for RenderMode
impl Hash for RenderMode
source§impl PartialEq for RenderMode
impl PartialEq for RenderMode
source§fn eq(&self, other: &RenderMode) -> bool
fn eq(&self, other: &RenderMode) -> bool
self and other values to be equal, and is used
by ==.