Struct simple_wgpu::Shader
source · 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)