pub trait Bind {
// Required method
fn bind(&self, gl: &GL);
// Provided method
fn unbind(&self, _gl: &GL) { ... }
}Expand description
The Bind trait enables setting up WebGl state when bound, and optionally resetting to a neutral one when unbound.
These functons should be implented without mutating the implementing struct, i.e. just changing the state of the WebGl2RenderingContext.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".