pub(crate) trait Bindable {
fn get_binder(&self) -> Result<&Binder, Error>;
fn get_mut_binder(&mut self) -> Result<&mut Binder, Error>;
fn setup(&mut self) -> Result<(), Error> { ... }
fn setup_texture(&mut self) -> Result<(), Error> { ... }
fn bind_all_no_texture(&self) -> Result<(), Error> { ... }
fn bind_all(&self) -> Result<(), Error> { ... }
fn bind_vao(&self) -> Result<(), Error> { ... }
fn bind_texture(&self) -> Result<(), Error> { ... }
fn unbind_texture(&self) -> Result<(), Error> { ... }
}
Expand description
General Information
An object that can be represented in CPU via a, ebo, vbo, vao and texture (the latter is not necessary).
Required Methods§
sourcefn get_binder(&self) -> Result<&Binder, Error>
fn get_binder(&self) -> Result<&Binder, Error>
Obtains binder associated to object. Getter.
sourcefn get_mut_binder(&mut self) -> Result<&mut Binder, Error>
fn get_mut_binder(&mut self) -> Result<&mut Binder, Error>
Obtain binder mutable reference.
Provided Methods§
sourcefn setup_texture(&mut self) -> Result<(), Error>
fn setup_texture(&mut self) -> Result<(), Error>
Shortcut to setup texture function.
sourcefn bind_all_no_texture(&self) -> Result<(), Error>
fn bind_all_no_texture(&self) -> Result<(), Error>
Shortcut to bind all without texture function.
sourcefn bind_texture(&self) -> Result<(), Error>
fn bind_texture(&self) -> Result<(), Error>
Shortcut to bind texture
sourcefn unbind_texture(&self) -> Result<(), Error>
fn unbind_texture(&self) -> Result<(), Error>
Shortcut to unbind texture