[−][src]Struct ggez::graphics::ShaderGeneric
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]
Spec: BackendSpec,
C: 'static + Pod + Structure<ConstFormat> + Clone + Copy,
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]
ctx: &mut Context,
vertex_path: P,
pixel_path: P,
consts: C,
name: S,
blend_modes: Option<&[BlendMode]>
) -> GameResult<Shader<C>>
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]
ctx: &mut Context,
vertex_source: &[u8],
pixel_source: &[u8],
consts: C,
name: S,
blend_modes: Option<&[BlendMode]>
) -> GameResult<Shader<C>>
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]
Spec::Resources: Clone,
fn clone(&self) -> ShaderGeneric<Spec, C>
[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]
Spec: BackendSpec,
C: Structure<ConstFormat>,
Auto Trait Implementations
impl<Spec, C> Unpin for ShaderGeneric<Spec, C> where
C: Unpin,
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,
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,
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]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> 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>,
T: Parameter<Self>,
Sets value
as a parameter of self
.