[][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 source files, constants and a name.

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 GLSL source code.

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> Unpin for ShaderGeneric<Spec, C> where
    C: Unpin

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

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> !RefUnwindSafe for ShaderGeneric<Spec, C>

impl<Spec, C> !UnwindSafe for ShaderGeneric<Spec, C>

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> 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.