pub struct Shader { /* private fields */ }
Expand description
Shader Object
Implementations§
Source§impl Shader
impl Shader
Sourcepub fn compile(&self) -> Result<(), String>
pub fn compile(&self) -> Result<(), String>
Compile this shader.
It will return Ok(())
if the shader is compiled successfully,
otherwise it will return Err(String)
which contains the error message.
Sourcepub unsafe fn compile_unchecked(&self)
pub unsafe fn compile_unchecked(&self)
Compile this shader without checking the result.
If self.compile().unwarp()
is never panic,
you can use unsafe { self.compile_unchecked() }
to improve performance.
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