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§
sourcefn new(ctx: &WebGLRenderingContext) -> Root<Dom<Self::Extension>>
fn new(ctx: &WebGLRenderingContext) -> Root<Dom<Self::Extension>>
Creates the DOM object of the WebGL extension.
sourcefn spec() -> WebGLExtensionSpec
fn spec() -> WebGLExtensionSpec
Returns which WebGL spec is this extension written against.
sourcefn is_supported(ext: &WebGLExtensions) -> bool
fn is_supported(ext: &WebGLExtensions) -> bool
Checks if the extension is supported.
sourcefn enable(ext: &WebGLExtensions)
fn enable(ext: &WebGLExtensions)
Enable the extension.
Object Safety§
This trait is not object safe.