Trait radiant_rs::Postprocessor[][src]

pub trait Postprocessor {
    type T;
    fn target(&self) -> &Texture;
fn draw(&self, renderer: &Renderer, args: &Self::T); fn process(&self, renderer: &Renderer, args: &Self::T) { ... } }

A custom postprocessor.

Postprocessing happens in three steps:

  • first, target() is invoked and expected to return an input texture target (to which the user will draw the input data to be postprocessed).
  • process() is invoked. Any drawing operations performed within will target the input texture.
  • draw() is invoked. Any drawing operations performed within will target the destination defined by the user.

Associated Types

Custom type for the args parameter supplied to process() and draw().

Required Methods

Expected to return a texture for user drawing operations to target.

Expected to draw the final result. Draws issued within this function will target the rendertarget that the postprocessor is supposed to render to.

Provided Methods

Optionally expected to processes input data. Draws issued within this function will target the texure returned by target() unless overridden via Renderer::render_to().

Implementors