Struct tiny_game_framework::Shader
source · 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_mat4fv(&self, name: &CStr, mat: &Mat4)
pub unsafe fn uniform_vec3f(&self, name: &CStr, vec: &Vec3)
Trait Implementations§
source§impl PartialEq for Shader
impl PartialEq for Shader
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