pub struct RendererConfig<'s> {
pub texture_format: TextureFormat,
pub depth_format: Option<TextureFormat>,
pub sample_count: u32,
pub shader: Option<ShaderModuleDescriptor<'s>>,
pub vertex_shader_entry_point: Option<&'s str>,
pub fragment_shader_entry_point: Option<&'s str>,
}Expand description
Configuration for the Renderer.
Use RendererConfig::new for sRGB framebuffers, RendererConfig::new_srgb
for linear framebuffers, or RendererConfig::with_shaders for custom shaders.
Fields§
§texture_format: TextureFormatThe output texture format. Must match your render target (e.g. the surface format).
depth_format: Option<TextureFormat>Optional depth format. Set this if your render pass uses a depth attachment.
sample_count: u32MSAA sample count. Defaults to 1 (no MSAA). Must match your render pass.
shader: Option<ShaderModuleDescriptor<'s>>Custom shader module. If None, the built-in imgui shaders are used.
vertex_shader_entry_point: Option<&'s str>Vertex shader entry point name. Only needed with custom shaders.
fragment_shader_entry_point: Option<&'s str>Fragment shader entry point name. Only needed with custom shaders.
Implementations§
Source§impl<'s> RendererConfig<'s>
impl<'s> RendererConfig<'s>
Sourcepub fn with_shaders(shader: ShaderModuleDescriptor<'s>) -> Self
pub fn with_shaders(shader: ShaderModuleDescriptor<'s>) -> Self
Create a new renderer config with custom shaders.
Source§impl RendererConfig<'_>
impl RendererConfig<'_>
Trait Implementations§
Auto Trait Implementations§
impl<'s> Freeze for RendererConfig<'s>
impl<'s> RefUnwindSafe for RendererConfig<'s>
impl<'s> Send for RendererConfig<'s>
impl<'s> Sync for RendererConfig<'s>
impl<'s> Unpin for RendererConfig<'s>
impl<'s> UnsafeUnpin for RendererConfig<'s>
impl<'s> UnwindSafe for RendererConfig<'s>
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