pub trait CompileShader<T: OutputTarget> {
    type Options;
    type Context;

    // Required method
    fn compile(
        self,
        options: Self::Options
    ) -> Result<ShaderCompilerOutput<T::Output, Self::Context>, ShaderCompileError>;
}
Expand description

A trait for objects that can be compiled into a shader.

Required Associated Types§

source

type Options

Options provided to the compiler.

source

type Context

Additional context returned by the compiler after compilation.

Required Methods§

source

fn compile( self, options: Self::Options ) -> Result<ShaderCompilerOutput<T::Output, Self::Context>, ShaderCompileError>

Consume the object and return the compiled output of the shader.

Implementors§

source§

impl<T, E> CompileShader<E> for CompilerBackend<T>
where T: CompileShader<E>, E: OutputTarget,

§

type Options = <T as CompileShader<E>>::Options

§

type Context = <T as CompileShader<E>>::Context