pub struct Shader { /* private fields */ }
Expand description
A handle to a compiled shader
The equivalent to wgpu::ShaderModule
Implementations§
Source§impl Shader
impl Shader
Sourcepub fn new(desc: ShaderModuleDescriptor<'_>, context: &Context) -> Self
pub fn new(desc: ShaderModuleDescriptor<'_>, context: &Context) -> Self
Create a new shader
It is generally easiest to use wgpu::include_wgsl to populate the desc
argument.
Sourcepub fn entry_point(&self, entry_point: &str) -> EntryPoint
pub fn entry_point(&self, entry_point: &str) -> EntryPoint
Associate the shader with a specific entry point (named main function)
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