Struct wayland_client::egl::WlEglSurface
[−]
[src]
pub struct WlEglSurface { /* fields omitted */ }
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]
fn new(surface: &WlSurface, width: i32, height: i32) -> WlEglSurface
Create an EGL surface from a wayland surface
fn get_size(&self) -> (i32, i32)
Fetch current size of the EGL surface
fn resize(&self, width: i32, height: i32, dx: i32, dy: i32)
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.
fn ptr(&self) -> *const c_void
Raw pointer to the EGL surface
You'll need this pointer to initialize the EGL context in your favourite OpenGL lib.