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
Sourcepub fn webgl<S>(canvas_selector: S, width: f64, height: f64) -> RenderConfig
pub fn webgl<S>(canvas_selector: S, width: f64, height: f64) -> RenderConfig
Source§impl RenderConfig
impl RenderConfig
pub fn get_backend(&self) -> RenderBackendType
pub fn get_canvas_selector(&self) -> String
pub fn get_width(&self) -> f64
pub fn set_width(&mut self, val: f64) -> &mut Self
pub fn get_height(&self) -> f64
pub fn set_height(&mut self, val: f64) -> &mut Self
pub fn get_quality(&self) -> RenderQuality
pub fn get_antialias(&self) -> bool
pub fn get_power_preference(&self) -> GpuPowerPreference
pub fn get_ssaa_scale_factor(&self) -> f64
Source§impl RenderConfig
impl RenderConfig
Trait Implementations§
Source§impl Clone for RenderConfig
impl Clone for RenderConfig
Source§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
Constructs a default RenderConfig value.
§Returns
RenderConfig- A default-constructed instance with the documented initial state.
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