pub struct SurfaceSettings {
pub vsync: bool,
pub depth_buffer: u8,
pub stencil_buffer: u8,
pub multisamples: u8,
pub hardware_acceleration: HardwareAcceleration,
}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 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more