pub struct SurfaceSettings {
pub vsync: bool,
pub depth_buffer: u8,
pub stencil_buffer: u8,
pub multisamples: u8,
pub hardware_acceleration: HardwareAcceleration,
}window only.Expand description
Settings controlling the behavior of the surface on where to draw, to present it on the screen.
Fields§
§vsync: boolTurn on vertical syncing, limiting the FPS to the display refresh rate. The default is true. On web this has no effect since vsync is always on.
depth_buffer: u8Sets the number of bits in the depth buffer. A value of 0 means no depth buffer. The default value is 24. On web, this can only be off (0) or on (>0).
stencil_buffer: u8Sets the number of bits in the stencil buffer. A value of 0 means no stencil buffer. The default value is 0. On web, this can only be off (0) or on (>0).
multisamples: u8Set the level of the multisampling anti-aliasing (MSAA). Must be a power-of-two. Higher = more smooth edges. A value of 0 turns it off. The default value is 4. On web, this can only be off (0) or on (>0). The actual number of samples depends on browser settings.
hardware_acceleration: HardwareAccelerationSpecify whether or not hardware acceleration is preferred, required, or off. The default is HardwareAcceleration::Preferred.
Trait Implementations§
Source§impl Clone for SurfaceSettings
impl Clone for SurfaceSettings
Source§fn clone(&self) -> SurfaceSettings
fn clone(&self) -> SurfaceSettings
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for SurfaceSettings
Source§impl Debug for SurfaceSettings
impl Debug for SurfaceSettings
Source§impl Default for SurfaceSettings
impl Default for SurfaceSettings
impl Eq for SurfaceSettings
Source§impl PartialEq for SurfaceSettings
impl PartialEq for SurfaceSettings
Source§fn eq(&self, other: &SurfaceSettings) -> bool
fn eq(&self, other: &SurfaceSettings) -> bool
self and other values to be equal, and is used by ==.