Skip to main content

WebGLExtensionWrapper

Trait WebGLExtensionWrapper 

Source
pub(crate) trait WebGLExtensionWrapper: JSTraceable + MallocSizeOf {
    // Required methods
    fn instance_or_init(
        &self,
        cx: &mut JSContext,
        ctx: &WebGLRenderingContext,
        ext: &WebGLExtensions,
        rval: MutableHandleObject<'_>,
    );
    fn spec(&self) -> WebGLExtensionSpec;
    fn is_supported(&self, _: &WebGLExtensions) -> bool;
    fn is_enabled(&self) -> bool;
    fn enable(&self, ext: &WebGLExtensions);
    fn name(&self) -> &'static str;
}
Expand description

Trait used internally by WebGLExtensions to store and handle the different WebGL extensions in a common list.

Required Methods§

Source

fn instance_or_init( &self, cx: &mut JSContext, ctx: &WebGLRenderingContext, ext: &WebGLExtensions, rval: MutableHandleObject<'_>, )

Source

fn spec(&self) -> WebGLExtensionSpec

Source

fn is_supported(&self, _: &WebGLExtensions) -> bool

Source

fn is_enabled(&self) -> bool

Source

fn enable(&self, ext: &WebGLExtensions)

Source

fn name(&self) -> &'static str

Implementors§