pub struct Device { /* private fields */ }
Expand description
Wrapper for EGLDevice
.
Implementations§
Source§impl Device
impl Device
Sourcepub fn query_devices() -> Result<impl Iterator<Item = Device>>
pub fn query_devices() -> Result<impl Iterator<Item = Device>>
Query the available devices.
This function returns Err
if the EGL_EXT_device_query
and
EGL_EXT_device_enumeration
or EGL_EXT_device_base
extensions are
not available.
Sourcepub fn extensions(&self) -> &HashSet<&'static str>
pub fn extensions(&self) -> &HashSet<&'static str>
Get the device extensions supported by this device.
These extensions are distinct from the display extensions and should not be used interchangeably.
Sourcepub fn name(&self) -> Option<&'static str>
pub fn name(&self) -> Option<&'static str>
Get the name of the device.
This function will return None
if the EGL_EXT_device_query_name
device extension is not available.
Sourcepub fn vendor(&self) -> Option<&'static str>
pub fn vendor(&self) -> Option<&'static str>
Get the vendor of the device.
This function will return None
if the EGL_EXT_device_query_name
device extension is not available.
Sourcepub fn raw_device(&self) -> EGLDeviceEXT
pub fn raw_device(&self) -> EGLDeviceEXT
Get a raw handle to the EGLDevice
.
Sourcepub fn drm_device_node_path(&self) -> Option<&'static Path>
pub fn drm_device_node_path(&self) -> Option<&'static Path>
Get the DRM primary or render device node path for this
EGLDeviceEXT
.
Requires the EGL_EXT_device_drm
extension.
If the EGL_EXT_device_drm_render_node
extension is supported, this
is guaranteed to return the primary device node path, or None
.
Consult Self::drm_render_device_node_path()
to retrieve the
render device node path.
Sourcepub fn drm_render_device_node_path(&self) -> Option<&'static Path>
pub fn drm_render_device_node_path(&self) -> Option<&'static Path>
Get the DRM render device node path for this EGLDeviceEXT
.
Requires the EGL_EXT_device_drm_render_node
extension.
If the EGL_EXT_device_drm
extension is supported in addition to
EGL_EXT_device_drm_render_node
,
consult Self::drm_device_node_path()
to retrieve the primary
device node path.