logo
pub struct Stage<B> where
    B: ?Sized + Shader
{ /* private fields */ }
Expand description

A shader stage.

Parametricity

  • B is the backend type.

Implementations

Create a new stage of type ty by compiling src.

Parametricity
  • C is the graphics context. C::Backend must implement the Shader trait.
  • R is the source code to use in the stage. It must implement AsRef<str>.
Notes

Feel free to consider using GraphicsContext::new_shader_stage for a simpler form of this method.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.