pub struct ShaderSetBuilder { /* private fields */ }
Expand description
Builder class which is used to begin the reflection and shader set construction process for a shader set. Provides all the functionality needed to build a shader set with provided shaders and then reflect appropriate gfx-hal and generic shader information.
Implementations§
Source§impl ShaderSetBuilder
impl ShaderSetBuilder
Sourcepub fn build<B: Backend>(
&self,
factory: &Factory<B>,
spec_constants: SpecConstantSet,
) -> Result<ShaderSet<B>, ShaderError>
pub fn build<B: Backend>( &self, factory: &Factory<B>, spec_constants: SpecConstantSet, ) -> Result<ShaderSet<B>, ShaderError>
Builds the Backend-specific shader modules using the provided SPIRV code provided to the builder. This function is called during the creation of a render pass.
§Parameters
factory
- factory to create shader modules.
Sourcepub fn with_vertex<S: Shader>(self, shader: &S) -> Result<Self, S::Error>
pub fn with_vertex<S: Shader>(self, shader: &S) -> Result<Self, S::Error>
Add a vertex shader to this shader set
Sourcepub fn with_fragment<S: Shader>(self, shader: &S) -> Result<Self, S::Error>
pub fn with_fragment<S: Shader>(self, shader: &S) -> Result<Self, S::Error>
Add a fragment shader to this shader set
Sourcepub fn with_geometry<S: Shader>(self, shader: &S) -> Result<Self, S::Error>
pub fn with_geometry<S: Shader>(self, shader: &S) -> Result<Self, S::Error>
Add a geometry shader to this shader set
Sourcepub fn with_hull<S: Shader>(self, shader: &S) -> Result<Self, S::Error>
pub fn with_hull<S: Shader>(self, shader: &S) -> Result<Self, S::Error>
Add a hull shader to this shader set
Trait Implementations§
Source§impl Clone for ShaderSetBuilder
impl Clone for ShaderSetBuilder
Source§fn clone(&self) -> ShaderSetBuilder
fn clone(&self) -> ShaderSetBuilder
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 moreSource§impl Debug for ShaderSetBuilder
impl Debug for ShaderSetBuilder
Source§impl Default for ShaderSetBuilder
impl Default for ShaderSetBuilder
Source§fn default() -> ShaderSetBuilder
fn default() -> ShaderSetBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ShaderSetBuilder
impl RefUnwindSafe for ShaderSetBuilder
impl Send for ShaderSetBuilder
impl Sync for ShaderSetBuilder
impl Unpin for ShaderSetBuilder
impl UnwindSafe for ShaderSetBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)