pub struct UniformContext { /* private fields */ }Expand description
This is the context object that is passed to each uniform’s update callback
Implementations§
Source§impl UniformContext
impl UniformContext
Sourcepub fn new(
gl: WebGl2RenderingContext,
now: f64,
uniform_location: WebGlUniformLocation,
) -> Self
pub fn new( gl: WebGl2RenderingContext, now: f64, uniform_location: WebGlUniformLocation, ) -> Self
@todo: make this into a builder pattern ?
pub fn gl(&self) -> &WebGl2RenderingContext
pub fn now(&self) -> f64
pub fn uniform_location(&self) -> &WebGlUniformLocation
Trait Implementations§
Source§impl Clone for UniformContext
impl Clone for UniformContext
Source§fn clone(&self) -> UniformContext
fn clone(&self) -> UniformContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UniformContext
impl Debug for UniformContext
Source§impl From<&UniformContext> for UniformContextJs
impl From<&UniformContext> for UniformContextJs
Source§fn from(attribute_create_context: &UniformContext) -> Self
fn from(attribute_create_context: &UniformContext) -> Self
Converts to this type from the input type.
Source§impl From<UniformContext> for UniformContextJs
impl From<UniformContext> for UniformContextJs
Source§fn from(attribute_create_context: UniformContext) -> Self
fn from(attribute_create_context: UniformContext) -> Self
Converts to this type from the input type.
Source§impl IntoJsWrapper for &UniformContext
impl IntoJsWrapper for &UniformContext
Source§type Result = UniformContextJs
type Result = UniformContextJs
This is the type that should returned from
into_js_wrapperSource§fn into_js_wrapper(self) -> Self::Result
fn into_js_wrapper(self) -> Self::Result
Converts a value into another value that can be converted into a
JsValueSource§impl IntoJsWrapper for UniformContext
impl IntoJsWrapper for UniformContext
Source§type Result = UniformContextJs
type Result = UniformContextJs
This is the type that should returned from
into_js_wrapperSource§fn into_js_wrapper(self) -> Self::Result
fn into_js_wrapper(self) -> Self::Result
Converts a value into another value that can be converted into a
JsValueAuto Trait Implementations§
impl Freeze for UniformContext
impl RefUnwindSafe for UniformContext
impl !Send for UniformContext
impl !Sync for UniformContext
impl Unpin for UniformContext
impl UnwindSafe for UniformContext
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