[−][src]Struct wayland_client::egl::WlEglSurface
EGL surface
This object is a simple wrapper around a WlSurface
to add the EGL
capabilities. Just use the ptr
method once this object is created
to get the window pointer your OpenGL library is needing to initialize the
EGL context (you'll most likely need the display ptr as well, that you can
get via the ptr
method of the Proxy
trait on the WlDisplay
object).
Methods
impl WlEglSurface
[src]
pub fn new(surface: &Proxy<WlSurface>, width: i32, height: i32) -> WlEglSurface
[src]
Create an EGL surface from a wayland surface
pub unsafe fn new_from_raw(
surface: *mut wl_proxy,
width: i32,
height: i32
) -> WlEglSurface
[src]
surface: *mut wl_proxy,
width: i32,
height: i32
) -> WlEglSurface
Create an EGL surface from a raw pointer to a wayland surface
This function is unsafe because surface
must be a valid wl_surface pointer
pub fn get_size(&self) -> (i32, i32)
[src]
Fetch current size of the EGL surface
pub fn resize(&self, width: i32, height: i32, dx: i32, dy: i32)
[src]
Resize the EGL surface
The two first arguments (width, height)
are the new size of
the surface, the two others (dx, dy)
represent the displacement
of the top-left corner of the surface. It allows you to control the
direction of the resizing if necessary.
pub fn ptr(&self) -> *const c_void
[src]
Raw pointer to the EGL surface
You'll need this pointer to initialize the EGL context in your favourite OpenGL lib.
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,