pub struct ShaderModuleBuilder { /* private fields */ }
Expand description
Builder class for creating a shader module.
Implementations§
Source§impl ShaderModuleBuilder
impl ShaderModuleBuilder
pub fn new() -> Self
Sourcepub fn with_entry_name(self, entry_name: &str) -> Self
pub fn with_entry_name(self, entry_name: &str) -> Self
Define the shader entry point (Defaults to main)
Sourcepub fn with_specializations(
self,
specializations: ShaderSpecializations<'static>,
) -> Self
pub fn with_specializations( self, specializations: ShaderSpecializations<'static>, ) -> Self
Attach specializations to the shader.
Sourcepub fn build<RenderBackend: Backend>(
self,
gpu: &mut Gpu<RenderBackend>,
shader_binary: &Vec<u32>,
shader_type: ShaderModuleType,
) -> ShaderModule<RenderBackend>
pub fn build<RenderBackend: Backend>( self, gpu: &mut Gpu<RenderBackend>, shader_binary: &Vec<u32>, shader_type: ShaderModuleType, ) -> ShaderModule<RenderBackend>
Builds the shader binary into a shader module located on the GPU. ShaderModules are specific to gfx-hal and can be used for building RenderPipelines
Auto Trait Implementations§
impl Freeze for ShaderModuleBuilder
impl RefUnwindSafe for ShaderModuleBuilder
impl Send for ShaderModuleBuilder
impl Sync for ShaderModuleBuilder
impl Unpin for ShaderModuleBuilder
impl UnwindSafe for ShaderModuleBuilder
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