[][src]Struct luminance::shader::Stage

pub struct Stage<B: ?Sized> where
    B: Shader
{ /* fields omitted */ }

A shader stage.

Parametricity

  • B is the backend type.

Implementations

impl<B: ?Sized> Stage<B> where
    B: Shader
[src]

pub fn new<C, R>(ctx: &mut C, ty: StageType, src: R) -> Result<Self, StageError> where
    C: GraphicsContext<Backend = B>,
    R: AsRef<str>, 
[src]

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

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.