[][src]Struct ggez::graphics::ShaderGeneric

pub struct ShaderGeneric<Spec: BackendSpec, C: Structure<ConstFormat>> { /* fields omitted */ }

A ShaderGeneric reprensents a handle user-defined shader that can be used with a ggez graphics context that is generic over gfx::Resources

As an end-user you shouldn't ever have to touch this and should use Shader instead.

Methods

impl<Spec, C> ShaderGeneric<Spec, C> where
    Spec: BackendSpec,
    C: 'static + Pod + Structure<ConstFormat> + Clone + Copy
[src]

pub fn new<P: AsRef<Path>, S: Into<String>>(
    ctx: &mut Context,
    vertex_path: P,
    pixel_path: P,
    consts: C,
    name: S,
    blend_modes: Option<&[BlendMode]>
) -> GameResult<Shader<C>>
[src]

Create a new Shader given a gfx pipeline object

In order to use a specific blend mode when this shader is being used, you must include that blend mode as part of the blend_modes parameter at creation. If None is given, only the default Alpha blend mode is used.

pub fn from_u8<S: Into<String>>(
    ctx: &mut Context,
    vertex_source: &[u8],
    pixel_source: &[u8],
    consts: C,
    name: S,
    blend_modes: Option<&[BlendMode]>
) -> GameResult<Shader<C>>
[src]

Create a new Shader directly from source given a gfx pipeline object

In order to use a specific blend mode when this shader is being used, you must include that blend mode as part of the blend_modes parameter at creation. If None is given, only the default Alpha blend mode is used.

Trait Implementations

impl<Spec: Clone + BackendSpec, C: Clone + Structure<ConstFormat>> Clone for ShaderGeneric<Spec, C> where
    Spec::Resources: Clone
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

impl<Spec, C> Debug for ShaderGeneric<Spec, C> where
    Spec: BackendSpec,
    C: Structure<ConstFormat>, 
[src]

Auto Trait Implementations

impl<Spec, C> Send for ShaderGeneric<Spec, C> where
    C: Send,
    <<Spec as BackendSpec>::Resources as Resources>::Buffer: Send + Sync,
    <<Spec as BackendSpec>::Resources as Resources>::Mapping: Send,
    <Spec as BackendSpec>::Resources: Resources

impl<Spec, C> Sync for ShaderGeneric<Spec, C> where
    C: Sync,
    <<Spec as BackendSpec>::Resources as Resources>::Buffer: Send + Sync,
    <<Spec as BackendSpec>::Resources as Resources>::Mapping: Send,
    <Spec as BackendSpec>::Resources: Resources

Blanket Implementations

impl<T> From for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Same for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf for SP where
    SS: SubsetOf<SP>, 

impl<T> Erased for T

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.