Trait script::dom::webgl_extensions::extension::WebGLExtension

source ·
pub trait WebGLExtension: Sized{
    type Extension;

    // Required methods
    fn new(ctx: &WebGLRenderingContext) -> Root<Dom<Self::Extension>>;
    fn spec() -> WebGLExtensionSpec;
    fn is_supported(ext: &WebGLExtensions) -> bool;
    fn enable(ext: &WebGLExtensions);
    fn name() -> &'static str;
}
Expand description

Trait implemented by WebGL extensions.

Required Associated Types§

Required Methods§

source

fn new(ctx: &WebGLRenderingContext) -> Root<Dom<Self::Extension>>

Creates the DOM object of the WebGL extension.

source

fn spec() -> WebGLExtensionSpec

Returns which WebGL spec is this extension written against.

source

fn is_supported(ext: &WebGLExtensions) -> bool

Checks if the extension is supported.

source

fn enable(ext: &WebGLExtensions)

Enable the extension.

source

fn name() -> &'static str

Name of the WebGL Extension.

Object Safety§

This trait is not object safe.

Implementors§