pub struct WebGLRenderingContext { /* private fields */ }Expand description
The WebGLRenderingContext class.
WebGLRenderingContext
Implementations§
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn make_xr_compatible(&self) -> Promise<Undefined>
pub fn make_xr_compatible(&self) -> Promise<Undefined>
The makeXRCompatible method.
WebGLRenderingContext.makeXRCompatible
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn buffer_data(&self, target: &Any, size: &Any, usage: &Any) -> Undefined
pub fn buffer_data(&self, target: &Any, size: &Any, usage: &Any) -> Undefined
The bufferData method.
WebGLRenderingContext.bufferData
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn buffer_data_with_target_and_data_and_usage(
&self,
target: &Any,
data: &Any,
usage: &Any,
) -> Undefined
pub fn buffer_data_with_target_and_data_and_usage( &self, target: &Any, data: &Any, usage: &Any, ) -> Undefined
The bufferData method.
WebGLRenderingContext.bufferData
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn buffer_sub_data(
&self,
target: &Any,
offset: &Any,
data: &Any,
) -> Undefined
pub fn buffer_sub_data( &self, target: &Any, offset: &Any, data: &Any, ) -> Undefined
The bufferSubData method.
WebGLRenderingContext.bufferSubData
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn tex_image2_d_with_target_and_level_and_internalformat_and_format_and_type_and_source(
&self,
target: &Any,
level: &Any,
internalformat: &Any,
format: &Any,
type_: &Any,
source: &Any,
) -> Undefined
pub fn tex_image2_d_with_target_and_level_and_internalformat_and_format_and_type_and_source( &self, target: &Any, level: &Any, internalformat: &Any, format: &Any, type_: &Any, source: &Any, ) -> Undefined
The texImage2D method.
WebGLRenderingContext.texImage2D
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform1fv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
pub fn uniform1fv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
The uniform1fv method.
WebGLRenderingContext.uniform1fv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform2fv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
pub fn uniform2fv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
The uniform2fv method.
WebGLRenderingContext.uniform2fv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform3fv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
pub fn uniform3fv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
The uniform3fv method.
WebGLRenderingContext.uniform3fv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform4fv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
pub fn uniform4fv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
The uniform4fv method.
WebGLRenderingContext.uniform4fv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform1iv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
pub fn uniform1iv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
The uniform1iv method.
WebGLRenderingContext.uniform1iv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform2iv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
pub fn uniform2iv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
The uniform2iv method.
WebGLRenderingContext.uniform2iv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform3iv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
pub fn uniform3iv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
The uniform3iv method.
WebGLRenderingContext.uniform3iv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform4iv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
pub fn uniform4iv(&self, location: &WebGLUniformLocation, v: &Any) -> Undefined
The uniform4iv method.
WebGLRenderingContext.uniform4iv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform_matrix2fv(
&self,
location: &WebGLUniformLocation,
transpose: &Any,
value: &Any,
) -> Undefined
pub fn uniform_matrix2fv( &self, location: &WebGLUniformLocation, transpose: &Any, value: &Any, ) -> Undefined
The uniformMatrix2fv method.
WebGLRenderingContext.uniformMatrix2fv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform_matrix3fv(
&self,
location: &WebGLUniformLocation,
transpose: &Any,
value: &Any,
) -> Undefined
pub fn uniform_matrix3fv( &self, location: &WebGLUniformLocation, transpose: &Any, value: &Any, ) -> Undefined
The uniformMatrix3fv method.
WebGLRenderingContext.uniformMatrix3fv
Source§impl WebGLRenderingContext
impl WebGLRenderingContext
Sourcepub fn uniform_matrix4fv(
&self,
location: &WebGLUniformLocation,
transpose: &Any,
value: &Any,
) -> Undefined
pub fn uniform_matrix4fv( &self, location: &WebGLUniformLocation, transpose: &Any, value: &Any, ) -> Undefined
The uniformMatrix4fv method.
WebGLRenderingContext.uniformMatrix4fv
Methods from Deref<Target = Any>§
Sourcepub fn has_own_property(&self, prop: &str) -> bool
pub fn has_own_property(&self, prop: &str) -> bool
Checks whether a non-inherited property prop exists
Sourcepub fn at<T>(&self, idx: T) -> Val
pub fn at<T>(&self, idx: T) -> Val
Gets the element at index idx. Assumes the underlying js type is indexable
Sourcepub fn to_vec<V>(&self) -> Vec<V>where
V: FromVal,
pub fn to_vec<V>(&self) -> Vec<V>where
V: FromVal,
Converts the underlying js array to a Vec of V
Sourcepub fn call(&self, f: &str, args: &[Val]) -> Val
pub fn call(&self, f: &str, args: &[Val]) -> Val
Calls the method f with args, can return an undefined js value
Sourcepub fn new(&self, args: &[Val]) -> Val
pub fn new(&self, args: &[Val]) -> Val
Calls the object’s constructor with args constructing a new object
Sourcepub fn invoke(&self, args: &[Val]) -> Val
pub fn invoke(&self, args: &[Val]) -> Val
Invokes the function object with args, can return an undefined js value
Sourcepub fn instanceof(&self, v: Val) -> bool
pub fn instanceof(&self, v: Val) -> bool
Checks whether this Val is an instanceof v
pub fn is_number(&self) -> bool
pub fn is_bool(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_null(&self) -> bool
pub fn is_undefined(&self) -> bool
pub fn is_error(&self) -> bool
pub fn is_function(&self) -> bool
pub fn as_<T>(&self) -> Twhere
T: FromVal,
Trait Implementations§
Source§impl AsMut<Val> for WebGLRenderingContext
impl AsMut<Val> for WebGLRenderingContext
Source§impl AsRef<Val> for WebGLRenderingContext
impl AsRef<Val> for WebGLRenderingContext
Source§impl Clone for WebGLRenderingContext
impl Clone for WebGLRenderingContext
Source§fn clone(&self) -> WebGLRenderingContext
fn clone(&self) -> WebGLRenderingContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WebGLRenderingContext
impl Debug for WebGLRenderingContext
Source§impl Deref for WebGLRenderingContext
impl Deref for WebGLRenderingContext
Source§impl DerefMut for WebGLRenderingContext
impl DerefMut for WebGLRenderingContext
Source§impl DynCast for WebGLRenderingContext
impl DynCast for WebGLRenderingContext
Source§fn instanceof(val: &Any) -> bool
fn instanceof(val: &Any) -> bool
val instanceof ThisType.Source§fn unchecked_from_val(v: Any) -> Self
fn unchecked_from_val(v: Any) -> Self
Val into Self.Source§fn unchecked_from_val_ref(v: &Any) -> &Self
fn unchecked_from_val_ref(v: &Any) -> &Self
&Val into &Self.Source§fn unchecked_from_val_mut(v: &mut Any) -> &mut Self
fn unchecked_from_val_mut(v: &mut Any) -> &mut Self
&mut Val into &mut Self.fn has_type<T>(&self) -> boolwhere
T: DynCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: DynCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: DynCast,
fn dyn_mut<T>(&mut self) -> Option<&mut T>where
T: DynCast,
fn unchecked_into<T>(self) -> Twhere
T: DynCast,
fn unchecked_ref<T>(&self) -> &Twhere
T: DynCast,
fn unchecked_mut<T>(&mut self) -> &mut Twhere
T: DynCast,
fn is_instance_of<T>(&self) -> boolwhere
T: DynCast,
Source§fn is_type_of(val: &Val) -> bool
fn is_type_of(val: &Val) -> bool
instanceof.