pub(crate) 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(crate) fn new( webgl_version: WebGLVersion, api_type: GlType, glsl_version: WebGLSLVersion, ) -> WebGLExtensions
pub(crate) fn init_once<F>(&self, cb: F)
pub(crate) fn register<T: 'static + WebGLExtension + JSTraceable + MallocSizeOf>( &self, )
pub(crate) fn get_supported_extensions(&self) -> Vec<&'static str>
pub(crate) fn get_or_init_extension( &self, name: &str, ctx: &WebGLRenderingContext, ) -> Option<NonNull<JSObject>>
pub(crate) fn is_enabled<T>(&self) -> bool
pub(crate) fn supports_gl_extension(&self, name: &str) -> bool
pub(crate) fn supports_any_gl_extension(&self, names: &[&str]) -> bool
pub(crate) fn supports_all_gl_extension(&self, names: &[&str]) -> bool
pub(crate) fn enable_tex_type(&self, data_type: u32)
pub(crate) fn is_tex_type_enabled(&self, data_type: u32) -> bool
pub(crate) fn add_effective_tex_internal_format( &self, source_internal_format: TexFormat, source_data_type: u32, effective_internal_format: TexFormat, )
pub(crate) fn get_effective_tex_internal_format( &self, source_internal_format: TexFormat, source_data_type: u32, ) -> TexFormat
pub(crate) fn enable_filterable_tex_type(&self, text_data_type: u32)
pub(crate) fn is_filterable(&self, text_data_type: u32) -> bool
pub(crate) fn enable_hint_target(&self, name: u32)
pub(crate) fn is_hint_target_enabled(&self, name: u32) -> bool
pub(crate) fn enable_get_parameter_name(&self, name: u32)
pub(crate) fn is_get_parameter_name_enabled(&self, name: u32) -> bool
pub(crate) fn enable_get_tex_parameter_name(&self, name: u32)
pub(crate) fn is_get_tex_parameter_name_enabled(&self, name: u32) -> bool
pub(crate) fn enable_get_vertex_attrib_name(&self, name: u32)
pub(crate) fn is_get_vertex_attrib_name_enabled(&self, name: u32) -> bool
pub(crate) fn add_tex_compression_formats(&self, formats: &[TexCompression])
pub(crate) fn get_tex_compression_format( &self, format_id: u32, ) -> Option<TexCompression>
pub(crate) fn get_tex_compression_ids(&self) -> Vec<u32>
fn register_all_extensions(&self)
pub(crate) fn enable_element_index_uint(&self)
pub(crate) fn is_element_index_uint_enabled(&self) -> bool
pub(crate) fn enable_blend_minmax(&self)
pub(crate) fn is_blend_minmax_enabled(&self) -> bool
pub(crate) fn is_float_buffer_renderable(&self) -> bool
pub(crate) fn is_min_glsl_version_satisfied( &self, min_glsl_version: WebGLSLVersion, ) -> bool
pub(crate) fn is_half_float_buffer_renderable(&self) -> bool
pub(crate) fn effective_type(&self, type_: u32) -> u32
pub(crate) 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