pub struct Shader { /* private fields */ }Expand description
Represents a shader and its layout
Implementations§
Source§impl Shader
impl Shader
pub fn new( assets: &AssetCache, label: impl Into<CowStr>, bind_group_names: &[&str], module: &ShaderModule, ) -> Result<Arc<Self>>
pub fn layouts(&self) -> &[Arc<BindGroupLayout>]
Sourcepub fn module(&self) -> &ShaderModule
pub fn module(&self) -> &ShaderModule
The wgpu shader module
pub fn to_pipeline( self: &Arc<Self>, gpu: &Gpu, info: GraphicsPipelineInfo<'_>, ) -> GraphicsPipeline
pub fn to_compute_pipeline( self: &Arc<Self>, gpu: &Gpu, entry_point: &str, ) -> ComputePipeline
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more