pub struct Shader { /* private fields */ }
Expand description
Shader is wrapper for opengl shader it holds only pointer of the shader so you can freely clone ti
Implementations§
Source§impl Shader
impl Shader
Sourcepub fn new<P: AsRef<Path>>(path: P) -> Result<Shader, String>
pub fn new<P: AsRef<Path>>(path: P) -> Result<Shader, String>
new loads and compiles shader from given path
Sourcepub fn default_vertex() -> Shader
pub fn default_vertex() -> Shader
default_vertex returns default vertex shader
Sourcepub fn default_fragment() -> Shader
pub fn default_fragment() -> Shader
default_fragment returns default fragment shader
pub fn no_texture_fragment() -> Shader
pub fn no_texture_vertex() -> Shader
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Shader
impl RefUnwindSafe for Shader
impl Send for Shader
impl Sync for Shader
impl Unpin for Shader
impl UnwindSafe for Shader
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more