Struct lambda_platform::gfx::shader::ShaderModuleBuilder
source · 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