pub struct OnscreenTemplate { /* private fields */ }
Implementations
sourceimpl OnscreenTemplate
impl OnscreenTemplate
pub fn new(swap_chain: Option<LegacySwapChain>) -> OnscreenTemplate
sourcepub fn set_samples_per_pixel(&self, samples: i32)
pub fn set_samples_per_pixel(&self, samples: i32)
Requires that any future Onscreen framebuffers derived from
this template must support making at least n
samples per pixel
which will all contribute to the final resolved color for that
pixel.
By default this value is usually set to 0 and that is referred to as “single-sample” rendering. A value of 1 or greater is referred to as “multisample” rendering.
There are some semantic differences between single-sample
rendering and multisampling with just 1 point sample such as it
being redundant to use the Framebuffer::resolve_samples
and
Framebuffer::resolve_samples_region
apis with single-sample
rendering.
n
The minimum number of samples per pixel
sourcepub fn set_stereo_enabled(&self, enabled: bool)
pub fn set_stereo_enabled(&self, enabled: bool)
Sets whether future Onscreen
framebuffers derived from this
template are attempted to be created with both left and right
buffers, for use with stereo display. If the display system
does not support stereo, then creation of the framebuffer will
fail.
enabled
Whether framebuffers are created with stereo buffers
sourcepub fn set_swap_throttled(&self, throttled: bool)
pub fn set_swap_throttled(&self, throttled: bool)
Requests that any future Onscreen
framebuffers derived from this
template should enable or disable swap throttling according to the given
throttled
argument.
throttled
Whether throttling should be enabled
Trait Implementations
sourceimpl Clone for OnscreenTemplate
impl Clone for OnscreenTemplate
sourcefn clone(&self) -> OnscreenTemplate
fn clone(&self) -> OnscreenTemplate
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for OnscreenTemplate
impl Debug for OnscreenTemplate
sourceimpl Default for OnscreenTemplate
impl Default for OnscreenTemplate
sourcefn default() -> OnscreenTemplate
fn default() -> OnscreenTemplate
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for OnscreenTemplate
impl Send for OnscreenTemplate
impl !Sync for OnscreenTemplate
impl Unpin for OnscreenTemplate
impl UnwindSafe for OnscreenTemplate
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.