Struct truck_rendimpl::WireShaders
source · pub struct WireShaders { /* private fields */ }
Expand description
shaders for rendering wireframes
Implementations§
source§impl WireShaders
impl WireShaders
sourcepub const fn new(
vertex_module: Arc<ShaderModule>,
vertex_entry: &'static str,
fragment_module: Arc<ShaderModule>,
fragment_entry: &'static str
) -> Self
pub const fn new(
vertex_module: Arc<ShaderModule>,
vertex_entry: &'static str,
fragment_module: Arc<ShaderModule>,
fragment_entry: &'static str
) -> Self
Constructor
Parameters
vertex_module
: vertex shader modulevertex_entry
: entry point of vertex shader modulefragment_module
: fragment shader module without texturefragment_entry
: entry point of fragment shader module without texture
Examples found in repository?
src/instance_creator.rs (lines 80-85)
75 76 77 78 79 80 81 82 83 84 85 86
fn default(device: &Device) -> Self {
let shader_module = Arc::new(device.create_shader_module(ShaderModuleDescriptor {
source: ShaderSource::Wgsl(include_str!("shaders/line.wgsl").into()),
label: None,
}));
Self::new(
Arc::clone(&shader_module),
"vs_main",
shader_module,
"fs_main",
)
}
Trait Implementations§
source§impl Clone for WireShaders
impl Clone for WireShaders
source§fn clone(&self) -> WireShaders
fn clone(&self) -> WireShaders
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more