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: u32Output width and, at render scale 1 (Renderer::set_render_scale), the internal image width (m_nTexSizeX;
MD2 “auto exact” = window size).
height: u32Output height and, at render scale 1, the internal image 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.