[][src]Trait sarekt::renderer::vertex_bindings::VertexBindings

pub unsafe trait VertexBindings {
    type BVA;
    type BVB;
    fn get_binding_description() -> Self::BVB;
fn get_attribute_descriptions() -> Vec<Self::BVA>; }

A trait that provides a static function that generates backend specific vertex bindings. This is mainly provided out of convenience and would need to be custom defined for each backend otherwise. It is possible to seperate them and provide a generic implementation for get_binding_descriptions if you're only using one binding.

BVB is backend specific vertex bindings object. BVA is backend specific vertex attributes object.

Unsafe because one must only bring one in scope and understand how to define vertex bindings for the specific backend for Sarekt, which requires understanding how the layouts and bindings are laid out in the shaders, or creating ones own shaders and understanding layouts and bindings in them for their backend.

Associated Types

type BVA

type BVB

Loading content...

Required methods

fn get_binding_description() -> Self::BVB

Return binding descriptions for the implemented type in the specific backend format. Bindings are bound during commands or command buffers and attach texture/image buffers to a binding location in the shader.

fn get_attribute_descriptions() -> Vec<Self::BVA>

Same as get_binding_description but for vertex attribute descriptions.

Loading content...

Implementors

Loading content...