Skip to main content

render_progress

Function render_progress 

Source
pub fn render_progress(num_frames: u64, verbosity: Verbosity) -> ProgressBar
Expand description

Create a progress bar for rendering frames.

Shows frame count and rendering progress with ETA.

§Arguments

  • num_frames - Total number of frames to render
  • verbosity - Verbosity level to respect

§Returns

A configured progress bar, or hidden bar if progress shouldn’t be shown.

§Examples

use oxigaf_cli::progress;
use oxigaf_cli::verbosity::Verbosity;

let pb = progress::render_progress(120, Verbosity::Normal);
for i in 0..120 {
    pb.set_message(format!("frame {:03}", i));
    pb.inc(1);
}
pb.finish_with_message("Rendering complete");