pub struct Shader<T: ShaderDescriptor<TEXTURES>, const TEXTURES: usize> { /* private fields */ }
Expand description

Represents the runtime metadata required to configure and draw with a shader.

Implementations

Creates a new shader. Shaders hold no mutable state and should be reused as often as possible.

Executes the given closure in the context of the shader.

Arguments
  • uniform - The uniform to use for the shader invocation.
  • textures - The set of textures to use in the fragment shader.

Trait Implementations

Executes the destructor for this type. Read more

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.