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 | |
glsl_130 | |
glsl_140 | |
glsl_150 | |
glsl_430 | |
targets |
Methods
impl<'a> ShaderSource<'a>
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.