Trait glium_sdl2::DisplayBuild
[−]
[src]
pub trait DisplayBuild { type Facade: Facade; type Err; fn build_glium_debug(
self,
_: DebugCallbackBehavior
) -> Result<Self::Facade, Self::Err>; unsafe fn build_glium_unchecked_debug(
self,
_: DebugCallbackBehavior
) -> Result<Self::Facade, Self::Err>; fn build_glium(self) -> Result<Self::Facade, Self::Err>
where
Self: Sized, { ... } unsafe fn build_glium_unchecked(self) -> Result<Self::Facade, Self::Err>
where
Self: Sized, { ... } }
An object that can build a facade object.
This trait is different from glium::DisplayBuild
because Rust doesn't allow trait
implementations on types from external crates, unless the trait is in the same crate as the impl.
To clarify, both glium::DisplayBuild
and sdl2::video::WindowBuilder
are in different crates
than glium_sdl2
.
Associated Types
type Facade: Facade
The object that this DisplayBuild
builds.
type Err
The type of error that initialization can return.
Required Methods
fn build_glium_debug(
self,
_: DebugCallbackBehavior
) -> Result<Self::Facade, Self::Err>
self,
_: DebugCallbackBehavior
) -> Result<Self::Facade, Self::Err>
Build a context and a facade to draw on it.
Performs a compatibility check to make sure that all core elements of glium are supported by the implementation.
unsafe fn build_glium_unchecked_debug(
self,
_: DebugCallbackBehavior
) -> Result<Self::Facade, Self::Err>
self,
_: DebugCallbackBehavior
) -> Result<Self::Facade, Self::Err>
Build a context and a facade to draw on it
This function does the same as build_glium
, except that the resulting context
will assume that the current OpenGL context will never change.
Provided Methods
fn build_glium(self) -> Result<Self::Facade, Self::Err> where
Self: Sized,
Self: Sized,
Build a context and a facade to draw on it.
Performs a compatibility check to make sure that all core elements of glium are supported by the implementation.
unsafe fn build_glium_unchecked(self) -> Result<Self::Facade, Self::Err> where
Self: Sized,
Self: Sized,
Build a context and a facade to draw on it
This function does the same as build_glium
, except that the resulting context
will assume that the current OpenGL context will never change.
Implementors
impl<'a> DisplayBuild for &'a mut WindowBuilder