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.