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
impl WebGLExtensions
pub fn new( webgl_version: WebGLVersion, api_type: GlType, glsl_version: WebGLSLVersion, ) -> WebGLExtensions
pub fn init_once<F>(&self, cb: F)
pub fn register<T: 'static + WebGLExtension + JSTraceable + MallocSizeOf>(&self)
pub fn get_supported_extensions(&self) -> Vec<&'static str>
pub fn get_or_init_extension( &self, name: &str, ctx: &WebGLRenderingContext, ) -> Option<NonNull<JSObject>>
pub fn is_enabled<T>(&self) -> bool
pub fn supports_gl_extension(&self, name: &str) -> bool
pub fn supports_any_gl_extension(&self, names: &[&str]) -> bool
pub fn supports_all_gl_extension(&self, names: &[&str]) -> bool
pub fn enable_tex_type(&self, data_type: u32)
pub fn is_tex_type_enabled(&self, data_type: u32) -> bool
pub fn add_effective_tex_internal_format( &self, source_internal_format: TexFormat, source_data_type: u32, effective_internal_format: TexFormat, )
pub fn get_effective_tex_internal_format( &self, source_internal_format: TexFormat, source_data_type: u32, ) -> TexFormat
pub fn enable_filterable_tex_type(&self, text_data_type: u32)
pub fn is_filterable(&self, text_data_type: u32) -> bool
pub fn enable_hint_target(&self, name: u32)
pub fn is_hint_target_enabled(&self, name: u32) -> bool
pub fn enable_get_parameter_name(&self, name: u32)
pub fn is_get_parameter_name_enabled(&self, name: u32) -> bool
pub fn enable_get_tex_parameter_name(&self, name: u32)
pub fn is_get_tex_parameter_name_enabled(&self, name: u32) -> bool
pub fn enable_get_vertex_attrib_name(&self, name: u32)
pub fn is_get_vertex_attrib_name_enabled(&self, name: u32) -> bool
pub fn add_tex_compression_formats(&self, formats: &[TexCompression])
pub fn get_tex_compression_format( &self, format_id: u32, ) -> Option<TexCompression>
pub fn get_tex_compression_ids(&self) -> Vec<u32>
fn register_all_extensions(&self)
pub fn enable_element_index_uint(&self)
pub fn is_element_index_uint_enabled(&self) -> bool
pub fn enable_blend_minmax(&self)
pub fn is_blend_minmax_enabled(&self) -> bool
pub fn is_float_buffer_renderable(&self) -> bool
pub fn is_min_glsl_version_satisfied( &self, min_glsl_version: WebGLSLVersion, ) -> bool
pub fn is_half_float_buffer_renderable(&self) -> bool
pub fn effective_type(&self, type_: u32) -> u32
pub fn is_gles(&self) -> bool
Trait Implementations§
source§impl MallocSizeOf for WebGLExtensions
impl MallocSizeOf for WebGLExtensions
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
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.
Auto Trait Implementations§
impl !Freeze for WebGLExtensions
impl !RefUnwindSafe for WebGLExtensions
impl !Send for WebGLExtensions
impl !Sync for WebGLExtensions
impl Unpin for WebGLExtensions
impl !UnwindSafe for WebGLExtensions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
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> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert