Struct khronos_egl::Dynamic
source · pub struct Dynamic<L, A> { /* private fields */ }
Expand description
Dynamic EGL API interface.
The first type parameter is the type of the underlying library handle.
The second Dynamic
type parameter gives the EGL API version provided by the library.
This type is only available when the dynamic
feature is enabled.
In most cases, you may prefer to directly use the DynamicInstance
type.
Implementations§
source§impl<L: Borrow<Library>> Dynamic<L, EGL1_0>
impl<L: Borrow<Library>> Dynamic<L, EGL1_0>
sourcepub unsafe fn load_from(lib: L) -> Result<Dynamic<L, EGL1_0>, Error>
pub unsafe fn load_from(lib: L) -> Result<Dynamic<L, EGL1_0>, Error>
Load the EGL API symbols from the given library.
This will load the most recent API provided by the library,
which is at least EGL 1.0.
You can check what version has actually been loaded using Dynamic::version
,
and/or convert to a more recent version using try_into
.
§Safety
This is fundamentally unsafe since there are no guaranties the input library complies to the EGL API.
source§impl<L: Borrow<Library>> Dynamic<L, EGL1_0>
impl<L: Borrow<Library>> Dynamic<L, EGL1_0>
sourcepub unsafe fn load_required(
lib: L
) -> Result<Dynamic<L, EGL1_0>, LoadError<Error>>
pub unsafe fn load_required( lib: L ) -> Result<Dynamic<L, EGL1_0>, LoadError<Error>>
Load the EGL API symbols from the given library.
The second Dynamic
type parameter gives the EGL API version expected to be provided by the library.
§Safety
This is fundamentally unsafe since there are no guaranties the input library complies to the EGL API.
source§impl<L: Borrow<Library>> Dynamic<L, EGL1_1>
impl<L: Borrow<Library>> Dynamic<L, EGL1_1>
sourcepub unsafe fn load_required(
lib: L
) -> Result<Dynamic<L, EGL1_1>, LoadError<Error>>
pub unsafe fn load_required( lib: L ) -> Result<Dynamic<L, EGL1_1>, LoadError<Error>>
Load the EGL API symbols from the given library.
The second Dynamic
type parameter gives the EGL API version expected to be provided by the library.
§Safety
This is fundamentally unsafe since there are no guaranties the input library complies to the EGL API.
source§impl<L: Borrow<Library>> Dynamic<L, EGL1_2>
impl<L: Borrow<Library>> Dynamic<L, EGL1_2>
sourcepub unsafe fn load_required(
lib: L
) -> Result<Dynamic<L, EGL1_2>, LoadError<Error>>
pub unsafe fn load_required( lib: L ) -> Result<Dynamic<L, EGL1_2>, LoadError<Error>>
Load the EGL API symbols from the given library.
The second Dynamic
type parameter gives the EGL API version expected to be provided by the library.
§Safety
This is fundamentally unsafe since there are no guaranties the input library complies to the EGL API.
source§impl<L: Borrow<Library>> Dynamic<L, EGL1_3>
impl<L: Borrow<Library>> Dynamic<L, EGL1_3>
sourcepub unsafe fn load_required(
lib: L
) -> Result<Dynamic<L, EGL1_3>, LoadError<Error>>
pub unsafe fn load_required( lib: L ) -> Result<Dynamic<L, EGL1_3>, LoadError<Error>>
Load the EGL API symbols from the given library.
The second Dynamic
type parameter gives the EGL API version expected to be provided by the library.
§Safety
This is fundamentally unsafe since there are no guaranties the input library complies to the EGL API.
source§impl<L: Borrow<Library>> Dynamic<L, EGL1_4>
impl<L: Borrow<Library>> Dynamic<L, EGL1_4>
sourcepub unsafe fn load_required(
lib: L
) -> Result<Dynamic<L, EGL1_4>, LoadError<Error>>
pub unsafe fn load_required( lib: L ) -> Result<Dynamic<L, EGL1_4>, LoadError<Error>>
Load the EGL API symbols from the given library.
The second Dynamic
type parameter gives the EGL API version expected to be provided by the library.
§Safety
This is fundamentally unsafe since there are no guaranties the input library complies to the EGL API.
source§impl<L: Borrow<Library>> Dynamic<L, EGL1_5>
impl<L: Borrow<Library>> Dynamic<L, EGL1_5>
sourcepub unsafe fn load_required(
lib: L
) -> Result<Dynamic<L, EGL1_5>, LoadError<Error>>
pub unsafe fn load_required( lib: L ) -> Result<Dynamic<L, EGL1_5>, LoadError<Error>>
Load the EGL API symbols from the given library.
The second Dynamic
type parameter gives the EGL API version expected to be provided by the library.
§Safety
This is fundamentally unsafe since there are no guaranties the input library complies to the EGL API.