Struct cuivre::graphics::shaders::Shader [−][src]
pub struct Shader { /* fields omitted */ }
Represents an OpenGL shader.
Methods
impl Shader
[src]
impl Shader
pub fn from_source(
source: &str,
shader_type: ShaderType
) -> Result<Shader, ShaderError>
[src]
pub fn from_source(
source: &str,
shader_type: ShaderType
) -> Result<Shader, ShaderError>
Create a new shader from GLSL source (provided as a CString), returns Shader object or OpenGL error log. shader_type: usually gl::VERTEX_SHADER or gl::FRAGMENT_SHADER
Trait Implementations
impl Loadable for Shader
[src]
impl Loadable for Shader
type LoadOptions = ShaderType
Type of an additional argument that can be supplied to the load
methods. Read more
type LoadError = ShaderError
Error type that can be by the load
methods. Read more
fn load_from_bytes(
data: &[u8],
shader_type: ShaderType
) -> Result<Self, ShaderError>
[src]
fn load_from_bytes(
data: &[u8],
shader_type: ShaderType
) -> Result<Self, ShaderError>
Loads the object from a byte sequence.
fn load_from_file<P: AsRef<OsStr>>(
path: P,
options: Self::LoadOptions
) -> Result<Self, Self::LoadError>
[src]
fn load_from_file<P: AsRef<OsStr>>(
path: P,
options: Self::LoadOptions
) -> Result<Self, Self::LoadError>
Loads the object from a file. Read more
impl Debug for Shader
[src]
impl Debug for Shader
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Shader
[src]
impl PartialEq for Shader
fn eq(&self, other: &Shader) -> bool
[src]
fn eq(&self, other: &Shader) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Shader) -> bool
[src]
fn ne(&self, other: &Shader) -> bool
This method tests for !=
.
impl Eq for Shader
[src]
impl Eq for Shader
impl PartialOrd for Shader
[src]
impl PartialOrd for Shader
fn partial_cmp(&self, other: &Shader) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Shader) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Shader) -> bool
[src]
fn lt(&self, other: &Shader) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Shader) -> bool
[src]
fn le(&self, other: &Shader) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Shader) -> bool
[src]
fn gt(&self, other: &Shader) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Shader) -> bool
[src]
fn ge(&self, other: &Shader) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Shader
[src]
impl Ord for Shader
fn cmp(&self, other: &Shader) -> Ordering
[src]
fn cmp(&self, other: &Shader) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for Shader
[src]
impl Hash for Shader
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Copy for Shader
[src]
impl Copy for Shader
impl Clone for Shader
[src]
impl Clone for Shader