Struct luminance::shader::Stage [−][src]
Expand description
Implementations
pub fn new<C, R>(ctx: &mut C, ty: StageType, src: R) -> Result<Self, StageError> where
C: GraphicsContext<Backend = B>,
R: AsRef<str>,
pub fn new<C, R>(ctx: &mut C, ty: StageType, src: R) -> Result<Self, StageError> where
C: GraphicsContext<Backend = B>,
R: AsRef<str>,
Create a new stage of type ty
by compiling src
.
Parametricity
C
is the graphics context.C::Backend
must implement theShader
trait.R
is the source code to use in the stage. It must implementAsRef<str>
.
Notes
Feel free to consider using GraphicsContext::new_shader_stage
for a simpler form of
this method.
Auto Trait Implementations
impl<B: ?Sized> RefUnwindSafe for Stage<B> where
<B as Shader>::StageRepr: RefUnwindSafe,
impl<B: ?Sized> UnwindSafe for Stage<B> where
<B as Shader>::StageRepr: UnwindSafe,