Expand description
Implementations
sourceimpl<B> Stage<B> where
B: ?Sized + Shader,
impl<B> Stage<B> where
B: ?Sized + Shader,
sourcepub 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> Send for Stage<B> where
<B as Shader>::StageRepr: Send,
impl<B: ?Sized> Sync for Stage<B> where
<B as Shader>::StageRepr: Sync,
impl<B: ?Sized> Unpin for Stage<B> where
<B as Shader>::StageRepr: Unpin,
impl<B: ?Sized> UnwindSafe for Stage<B> where
<B as Shader>::StageRepr: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more