Struct bgfx_rs::static_lib::Shader
source · pub struct Shader { /* private fields */ }
Implementations§
source§impl Shader
impl Shader
sourcepub fn create_shader(mem: &Memory) -> Shader
pub fn create_shader(mem: &Memory) -> Shader
mem
: Shader binary.
sourcepub fn set_name(&self, name: &str)
pub fn set_name(&self, name: &str)
handle
: Shader handle.name
: Shader name.len
: Shader name length (if length is INT32_MAX, it’s expected that _name is zero terminated string).
sourcepub fn create_program(&self, fsh: &Shader, destroy_shaders: bool) -> Program
pub fn create_program(&self, fsh: &Shader, destroy_shaders: bool) -> Program
vsh
: Vertex shader.fsh
: Fragment shader.destroy_shaders
: If true, shaders will be destroyed when program is destroyed.
sourcepub fn create_compute_program(&self, destroy_shaders: bool) -> Program
pub fn create_compute_program(&self, destroy_shaders: bool) -> Program
csh
: Compute shader.destroy_shaders
: If true, shaders will be destroyed when program is destroyed.
impl Shader
This impl block contains no items.
Returns the number of uniforms and uniform handles used inside a shader.
Notice that only non-predefined uniforms are returned.
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