Skip to main content

IPlatformGraphicsContext

Trait IPlatformGraphicsContext 

Source
pub trait IPlatformGraphicsContext: IOptionalFeatureProvider {
    // Required methods
    fn is_lost(&self) -> bool;
    fn ensure_current(&self) -> Rc<dyn IDisposable>;
    fn dispose(&self);
    fn as_any(&self) -> &dyn Any;
}
Expand description

A context of a platform GPU API.

Required Methods§

Source

fn is_lost(&self) -> bool

Whether the context is lost and cannot be used anymore.

Source

fn ensure_current(&self) -> Rc<dyn IDisposable>

Makes the context current. Disposing the result restores the previously current context.

Source

fn dispose(&self)

Releases the context.

Source

fn as_any(&self) -> &dyn Any

Lets the backend recover the concrete context type.

Trait Implementations§

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§