pub struct WebGL2State { /* private fields */ }Expand description
The graphics state.
This type represents the current state of a given graphics context. It acts as a forward-gate to all the exposed features from the low-level API but adds a small cache layer over it to prevent from issuing the same API call (with the same parameters).
Implementations§
Source§impl WebGL2State
impl WebGL2State
Sourcepub fn get_max_texture_array_elements(&mut self) -> Option<usize>
pub fn get_max_texture_array_elements(&mut self) -> Option<usize>
Get the number of maximum elements an array texture can hold.
Cache the number on the first call and then re-use it for later calls.
Trait Implementations§
Source§impl BindBuffer<{ WebGl2RenderingContext::ARRAY_BUFFER }> for WebGL2State
impl BindBuffer<{ WebGl2RenderingContext::ARRAY_BUFFER }> for WebGL2State
fn bind_buffer(&mut self, handle: &WebGlBuffer, bind_mode: Bind)
Source§impl BindBuffer<{ WebGl2RenderingContext::ELEMENT_ARRAY_BUFFER }> for WebGL2State
impl BindBuffer<{ WebGl2RenderingContext::ELEMENT_ARRAY_BUFFER }> for WebGL2State
fn bind_buffer(&mut self, handle: &WebGlBuffer, bind_mode: Bind)
Source§impl BindBuffer<{ WebGl2RenderingContext::UNIFORM_BUFFER }> for WebGL2State
impl BindBuffer<{ WebGl2RenderingContext::UNIFORM_BUFFER }> for WebGL2State
fn bind_buffer(&mut self, handle: &WebGlBuffer, bind: Bind)
Source§impl Debug for WebGL2State
impl Debug for WebGL2State
Source§impl Drop for WebGL2State
impl Drop for WebGL2State
Auto Trait Implementations§
impl Freeze for WebGL2State
impl RefUnwindSafe for WebGL2State
impl !Send for WebGL2State
impl !Sync for WebGL2State
impl Unpin for WebGL2State
impl UnsafeUnpin for WebGL2State
impl UnwindSafe for WebGL2State
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