RenderBinding

Trait RenderBinding 

Source
pub trait RenderBinding {
    type Params: ReadOnlySystemParam;

    // Required methods
    fn describe(
        &mut self,
        params: &SystemParamItem<'_, '_, Self::Params>,
        builder: &mut RenderBindingBuilder,
    );
    fn label(&self) -> &str;
}
Expand description

A trait for describing a render binding.

This trait is used to declare bind-group entries by referencing resources from RenderData. Register the type using RenderBindingRegisterPlugin and retrieve the prepared GPU side through GpuRenderBinding in render systems.

Required Associated Types§

Source

type Params: ReadOnlySystemParam

Required Methods§

Source

fn describe( &mut self, params: &SystemParamItem<'_, '_, Self::Params>, builder: &mut RenderBindingBuilder, )

Describes the render binding. This is used to specify the RenderData that should be used to create the bind group layout and bind group entries, and to specify the binding index for each buffer and texture.

Source

fn label(&self) -> &str

Whether the gpu asset should be recreated. This is called every frame. The default is to never recreate (None).

Implementors§