Struct old_school_gfx_glutin_ext::Builder
source · pub struct Builder<'a, T: 'static> { /* private fields */ }
Expand description
Builder for initialising a winit window, glutin context & gfx views.
Implementations§
source§impl<T> Builder<'_, T>
impl<T> Builder<'_, T>
sourcepub fn surface_attributes(
self,
surface_attrs: SurfaceAttributesBuilder<WindowSurface>
) -> Self
pub fn surface_attributes( self, surface_attrs: SurfaceAttributesBuilder<WindowSurface> ) -> Self
Configure surface attributes.
If not called glutin default settings are used.
sourcepub fn context_attributes(self, ctx_attrs: ContextAttributesBuilder) -> Self
pub fn context_attributes(self, ctx_attrs: ContextAttributesBuilder) -> Self
Configure context attributes.
If not called glutin default settings are used.
sourcepub fn config_template(self, conf: ConfigTemplateBuilder) -> Self
pub fn config_template(self, conf: ConfigTemplateBuilder) -> Self
Configure ConfigTemplateBuilder
.
sourcepub fn number_of_samples(self, pref: impl Into<NumberOfSamples>) -> Self
pub fn number_of_samples(self, pref: impl Into<NumberOfSamples>) -> Self
Configure NumberOfSamples
preference.
Default 0
/ no samples.
sourcepub fn build<Color, Depth>(self) -> Result<Init<Color, Depth>, Box<dyn Error>>where
Color: RenderFormat,
Depth: DepthFormat,
pub fn build<Color, Depth>(self) -> Result<Init<Color, Depth>, Box<dyn Error>>where
Color: RenderFormat,
Depth: DepthFormat,
Initialise a winit window, glutin context & gfx views.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> !RefUnwindSafe for Builder<'a, T>
impl<'a, T> !Send for Builder<'a, T>
impl<'a, T> !Sync for Builder<'a, T>
impl<'a, T> Unpin for Builder<'a, T>
impl<'a, T> !UnwindSafe for Builder<'a, T>
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