[go: up one dir, main page]

Struct egli::Surface [] [src]

pub struct Surface {
    // some fields omitted
}

[EGL 1.0] RAII wrapper for EGLSurface.

When dropped, frees up the surface with eglDestroySurface call.

Note that the surface would not be immediately freed if it is current to any thread. In such a case, the surface will be freed when it is no longer used.

Methods

impl Surface
[src]

fn from_handle(display_handle: EGLDisplay, surface_handle: EGLSurface) -> Surface

Create a Surface from an existing EGL display and surface handles.

fn handle(&self) -> EGLSurface

Get raw handle.

fn query_width(&self) -> Result<i32>

[EGL 1.0] Returns the width of the surface in pixels.

Result of eglQuerySurface with EGL_WIDTH parameter.

fn query_height(&self) -> Result<i32>

[EGL 1.0] Returns the height of the surface in pixels.

Result of eglQuerySurface with EGL_HEIGHT parameter.

fn forget(self) -> EGLSurface

Drops Surface without cleaning up any resources.

Returns EGLSurface handle.

Alias for Into<egl::EGLSurface>.

Trait Implementations

impl Drop for Surface
[src]

fn drop(&mut self)

A method called when the value goes out of scope. Read more

impl Into<EGLSurface> for Surface
[src]

fn into(self) -> EGLSurface

Performs the conversion.