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§

Obtains binder associated to object. Getter.

Obtain binder mutable reference.

Provided Methods§

Shortcut to binder setup function.

Shortcut to setup texture function.

Shortcut to bind all without texture function.

Shortcut to bind all function.

Shortcut to bind vao function

Shortcut to bind texture

Shortcut to unbind texture

Implementors§