pub struct Display { /* private fields */ }
egl_backend
only.Expand description
A wrapper for the EGLDisplay
and its supported extensions.
Implementations§
source§impl Display
impl Display
sourcepub unsafe fn new(raw_display: RawDisplayHandle) -> Result<Self>
pub unsafe fn new(raw_display: RawDisplayHandle) -> Result<Self>
Create EGL display with the native display.
Safety
raw_display
must point to a valid system display. Using zero or
[std::ptr::null]
for the display will result in using
EGL_DEFAULT_DISPLAY
, which is not recommended or will
work on a platform with a concept of native display, like Wayland.
sourcepub unsafe fn with_device(
device: &Device,
raw_display: Option<RawDisplayHandle>
) -> Result<Self>
pub unsafe fn with_device( device: &Device, raw_display: Option<RawDisplayHandle> ) -> Result<Self>
Create an EGL display using the specified device.
In most cases, prefer Display::new
unless you need to render
off screen or use other extensions like EGLStreams.
This function may take an optional RawDisplayHandle
argument. At the
moment the raw_display
argument is ignored and this function will
return Err
. This may change in the future.
Safety
If raw_display
is Some
, raw_display
must point to a valid system
display.
Trait Implementations§
source§impl AsRawDisplay for Display
impl AsRawDisplay for Display
source§fn raw_display(&self) -> RawDisplay
fn raw_display(&self) -> RawDisplay
source§impl GetDisplayExtensions for Display
impl GetDisplayExtensions for Display
source§impl GlDisplay for Display
impl GlDisplay for Display
§type NotCurrentContext = NotCurrentContext
type NotCurrentContext = NotCurrentContext
§type PbufferSurface = Surface<PbufferSurface>
type PbufferSurface = Surface<PbufferSurface>
§type PixmapSurface = Surface<PixmapSurface>
type PixmapSurface = Surface<PixmapSurface>
§type WindowSurface = Surface<WindowSurface>
type WindowSurface = Surface<WindowSurface>
source§unsafe fn find_configs(
&self,
template: ConfigTemplate
) -> Result<Box<dyn Iterator<Item = Self::Config> + '_>>
unsafe fn find_configs( &self, template: ConfigTemplate ) -> Result<Box<dyn Iterator<Item = Self::Config> + '_>>
template
. Read more