Struct script::dom::webgl_extensions::extensions::WebGLExtensions

source ·
pub struct WebGLExtensions {
    extensions: DomRefCell<HashMap<String, Box<dyn WebGLExtensionWrapper>>>,
    features: DomRefCell<WebGLExtensionFeatures>,
    webgl_version: WebGLVersion,
    api_type: GlType,
    glsl_version: WebGLSLVersion,
}
Expand description

Handles the list of implemented, supported and enabled WebGL extensions.

Fields§

§extensions: DomRefCell<HashMap<String, Box<dyn WebGLExtensionWrapper>>>§features: DomRefCell<WebGLExtensionFeatures>§webgl_version: WebGLVersion§api_type: GlType§glsl_version: WebGLSLVersion

Implementations§

source§

impl WebGLExtensions

source

pub fn new( webgl_version: WebGLVersion, api_type: GlType, glsl_version: WebGLSLVersion, ) -> WebGLExtensions

source

pub fn init_once<F>(&self, cb: F)
where F: FnOnce() -> String,

source

pub fn register<T: 'static + WebGLExtension + JSTraceable + MallocSizeOf>(&self)

source

pub fn get_supported_extensions(&self) -> Vec<&'static str>

source

pub fn get_or_init_extension( &self, name: &str, ctx: &WebGLRenderingContext, ) -> Option<NonNull<JSObject>>

source

pub fn is_enabled<T>(&self) -> bool
where T: 'static + WebGLExtension + JSTraceable + MallocSizeOf,

source

pub fn supports_gl_extension(&self, name: &str) -> bool

source

pub fn supports_any_gl_extension(&self, names: &[&str]) -> bool

source

pub fn supports_all_gl_extension(&self, names: &[&str]) -> bool

source

pub fn enable_tex_type(&self, data_type: u32)

source

pub fn is_tex_type_enabled(&self, data_type: u32) -> bool

source

pub fn add_effective_tex_internal_format( &self, source_internal_format: TexFormat, source_data_type: u32, effective_internal_format: TexFormat, )

source

pub fn get_effective_tex_internal_format( &self, source_internal_format: TexFormat, source_data_type: u32, ) -> TexFormat

source

pub fn enable_filterable_tex_type(&self, text_data_type: u32)

source

pub fn is_filterable(&self, text_data_type: u32) -> bool

source

pub fn enable_hint_target(&self, name: u32)

source

pub fn is_hint_target_enabled(&self, name: u32) -> bool

source

pub fn enable_get_parameter_name(&self, name: u32)

source

pub fn is_get_parameter_name_enabled(&self, name: u32) -> bool

source

pub fn enable_get_tex_parameter_name(&self, name: u32)

source

pub fn is_get_tex_parameter_name_enabled(&self, name: u32) -> bool

source

pub fn enable_get_vertex_attrib_name(&self, name: u32)

source

pub fn is_get_vertex_attrib_name_enabled(&self, name: u32) -> bool

source

pub fn add_tex_compression_formats(&self, formats: &[TexCompression])

source

pub fn get_tex_compression_format( &self, format_id: u32, ) -> Option<TexCompression>

source

pub fn get_tex_compression_ids(&self) -> Vec<u32>

source

fn register_all_extensions(&self)

source

pub fn enable_element_index_uint(&self)

source

pub fn is_element_index_uint_enabled(&self) -> bool

source

pub fn enable_blend_minmax(&self)

source

pub fn is_blend_minmax_enabled(&self) -> bool

source

pub fn is_float_buffer_renderable(&self) -> bool

source

pub fn is_min_glsl_version_satisfied( &self, min_glsl_version: WebGLSLVersion, ) -> bool

source

pub fn is_half_float_buffer_renderable(&self) -> bool

source

pub fn effective_type(&self, type_: u32) -> u32

source

pub fn is_gles(&self) -> bool

Trait Implementations§

source§

impl MallocSizeOf for WebGLExtensions

source§

fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize

Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself.
source§

impl Traceable for WebGLExtensions

source§

unsafe fn trace(&self, tracer: *mut JSTracer)

Trace self.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<T> Filterable for T

source§

fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>

Creates a filterable data provider with the given name for debugging. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T