pub trait WebGLExtension: Sizedwhere
    Self::Extension: DomObject + JSTraceable,
{ type Extension; 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.

Implementors§