Struct gfx::extra::shade::ShaderSource
[−]
[src]
pub struct ShaderSource<'a> { pub glsl_120: Option<&'a [u8]>, pub glsl_130: Option<&'a [u8]>, pub glsl_140: Option<&'a [u8]>, pub glsl_150: Option<&'a [u8]>, pub glsl_430: Option<&'a [u8]>, pub targets: &'a [&'a str], }
A type storing shader source for different graphics APIs and versions.
Fields
glsl_120: Option<&'a [u8]>
glsl_130: Option<&'a [u8]>
glsl_140: Option<&'a [u8]>
glsl_150: Option<&'a [u8]>
glsl_430: Option<&'a [u8]>
targets: &'a [&'a str]
Methods
impl<'a> ShaderSource<'a>
[src]
fn empty() -> ShaderSource<'a>
Create an empty shader source. Useful for specifying the remaining structure members upon construction.
fn choose(&self, model: ShaderModel) -> Result<&'a [u8], ()>
Pick one of the stored versions that is the highest supported by the device.
Trait Implementations
impl<'a> Debug for ShaderSource<'a>
[src]
impl<'a> PartialEq for ShaderSource<'a>
[src]
fn eq(&self, __arg_0: &ShaderSource<'a>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ShaderSource<'a>) -> bool
This method tests for !=
.
impl<'a> Clone for ShaderSource<'a>
[src]
fn clone(&self) -> ShaderSource<'a>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more