pub struct RenderConfig { /* private fields */ }Expand description
Rendering configuration controlling the backend type, canvas target, viewport dimensions, quality, and backend-specific options.
Passed as part of EngineConfig when instantiating the engine.
Implementations§
Source§impl RenderConfig
Implements construction helpers for RenderConfig.
impl RenderConfig
Implements construction helpers for RenderConfig.
Sourcepub fn canvas2d<S>(canvas_selector: S, width: f64, height: f64) -> RenderConfig
pub fn canvas2d<S>(canvas_selector: S, width: f64, height: f64) -> RenderConfig
Sourcepub fn webgpu<S>(canvas_selector: S, width: f64, height: f64) -> RenderConfig
pub fn webgpu<S>(canvas_selector: S, width: f64, height: f64) -> RenderConfig
Source§impl RenderConfig
impl RenderConfig
pub fn get_backend(&self) -> RenderBackendType
pub fn get_mut_backend(&mut self) -> &mut RenderBackendType
pub fn set_backend(&mut self, val: RenderBackendType) -> &mut Self
pub fn get_canvas_selector(&self) -> String
pub fn get_mut_canvas_selector(&mut self) -> &mut String
pub fn set_canvas_selector(&mut self, val: String) -> &mut Self
pub fn get_width(&self) -> f64
pub fn get_mut_width(&mut self) -> &mut f64
pub fn set_width(&mut self, val: f64) -> &mut Self
pub fn get_height(&self) -> f64
pub fn get_mut_height(&mut self) -> &mut f64
pub fn set_height(&mut self, val: f64) -> &mut Self
pub fn get_quality(&self) -> RenderQuality
pub fn get_mut_quality(&mut self) -> &mut RenderQuality
pub fn set_quality(&mut self, val: RenderQuality) -> &mut Self
pub fn get_antialias(&self) -> bool
pub fn get_mut_antialias(&mut self) -> &mut bool
pub fn set_antialias(&mut self, val: bool) -> &mut Self
pub fn get_power_preference(&self) -> GpuPowerPreference
pub fn get_mut_power_preference(&mut self) -> &mut GpuPowerPreference
pub fn set_power_preference(&mut self, val: GpuPowerPreference) -> &mut Self
pub fn get_ssaa_scale_factor(&self) -> f64
pub fn get_mut_ssaa_scale_factor(&mut self) -> &mut f64
pub fn set_ssaa_scale_factor(&mut self, val: f64) -> &mut Self
Trait Implementations§
Source§impl Clone for RenderConfig
impl Clone for RenderConfig
Source§fn clone(&self) -> RenderConfig
fn clone(&self) -> RenderConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderConfig
impl Debug for RenderConfig
Source§impl Default for RenderConfig
Implements Default for RenderConfig with sensible default values.
impl Default for RenderConfig
Implements Default for RenderConfig with sensible default values.
Source§fn default() -> RenderConfig
fn default() -> RenderConfig
Returns the “default value” for a type. Read more
Source§impl PartialEq for RenderConfig
impl PartialEq for RenderConfig
impl StructuralPartialEq for RenderConfig
Auto Trait Implementations§
impl Freeze for RenderConfig
impl RefUnwindSafe for RenderConfig
impl Send for RenderConfig
impl Sync for RenderConfig
impl Unpin for RenderConfig
impl UnsafeUnpin for RenderConfig
impl UnwindSafe for RenderConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more