pub struct MaterialSpec<'a> {
pub label: &'a str,
pub shader: &'a str,
pub vertex_entry: &'a str,
pub fragment_entry: &'a str,
pub vertex_layouts: &'a [VertexBufferLayout<'a>],
pub resources: &'a [&'a [BindGroupLayoutEntry]],
pub features: FeatureRequest,
pub topology: PrimitiveTopology,
pub blend: Option<BlendState>,
pub depth: DepthMode,
pub convention: DepthConvention,
pub standard_z_compare: CompareFunction,
}Fields§
§label: &'a str§shader: &'a str§vertex_entry: &'a str§fragment_entry: &'a str§vertex_layouts: &'a [VertexBufferLayout<'a>]§resources: &'a [&'a [BindGroupLayoutEntry]]One bind group layout per entry, in group order.
features: FeatureRequest§topology: PrimitiveTopology§blend: Option<BlendState>§depth: DepthMode§convention: DepthConvention§standard_z_compare: CompareFunctionImplementations§
Source§impl MaterialSpec<'_>
impl MaterialSpec<'_>
Sourcepub fn build(
&self,
gpu: &GpuContext,
target: TextureFormat,
) -> Result<MaterialPipeline, MissingGpuCapability>
pub fn build( &self, gpu: &GpuContext, target: TextureFormat, ) -> Result<MaterialPipeline, MissingGpuCapability>
Resolves features before creating any GPU object, so a refusal leaves the device untouched.
Auto Trait Implementations§
impl<'a> Freeze for MaterialSpec<'a>
impl<'a> RefUnwindSafe for MaterialSpec<'a>
impl<'a> Send for MaterialSpec<'a>
impl<'a> Sync for MaterialSpec<'a>
impl<'a> Unpin for MaterialSpec<'a>
impl<'a> UnsafeUnpin for MaterialSpec<'a>
impl<'a> UnwindSafe for MaterialSpec<'a>
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