pub struct RenderConfig {
pub width: u32,
pub height: u32,
pub mesh: [u32; 2],
pub texel_offset: [f32; 2],
pub output_format: TextureFormat,
pub seed: u64,
pub compat: Compat,
pub stroke: StrokeRaster,
}Expand description
Renderer construction parameters.
Fields§
§width: u32Internal image width (m_nTexSizeX; MD2 “auto exact” = window size), also the output width.
height: u32Internal image height, also the output height.
mesh: [u32; 2]Warp mesh cells [gx, gy] (both even, e.g. [48, 36]).
texel_offset: [f32; 2]In texels; added to warp UVs (MD2: 0.5, projectM/modern APIs: 0).
output_format: TextureFormatFormat of the host target view passed to render_frame. *Srgb formats are compensated so
stored bytes equal a non-sRGB render.
seed: u64Seeds noise textures, rotation matrices, hue offsets.
compat: CompatMD2 vs projectM behaviour where they differ (default projectM).
stroke: StrokeRasterRasterisation of 1-pixel lines and points, see StrokeRaster.
Implementations§
Source§impl RenderConfig
impl RenderConfig
Sourcepub fn from_run(run: &RunConfig, output_format: TextureFormat) -> Self
pub fn from_run(run: &RunConfig, output_format: TextureFormat) -> Self
Build a config from the ABI’s RunConfig (size, mesh, texel offset, seed) and the host
target format; compatibility and stroke mode take their defaults.
Trait Implementations§
Source§impl Clone for RenderConfig
impl Clone for RenderConfig
Source§impl Debug for RenderConfig
impl Debug for RenderConfig
Auto Trait Implementations§
impl Freeze for RenderConfig
impl RefUnwindSafe for RenderConfig
impl Send for RenderConfig
impl Sync for RenderConfig
impl Unpin for RenderConfig
impl UnsafeUnpin for RenderConfig
impl UnwindSafe for RenderConfig
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