pub struct Shader {
pub id: u32,
}
Fields§
§id: u32
Implementations§
Source§impl Shader
impl Shader
pub fn new(shader_type: GLenum, code: &str) -> Self
pub fn new_pipeline(vs_code: &str, fs_code: &str) -> Self
pub unsafe fn use_shader(&self)
pub unsafe fn stop_shader(&self)
pub unsafe fn uniform_1f(&self, name: &CStr, val: f32)
pub unsafe fn uniform_1i(&self, name: &CStr, val: i32)
pub unsafe fn uniform_mat4fv(&self, name: &CStr, mat: &[f32; 16])
pub unsafe fn uniform_vec3f(&self, name: &CStr, vec: &Vec3)
Trait Implementations§
impl Copy for Shader
impl Eq for Shader
impl StructuralPartialEq for Shader
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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