Skip to content

Gifs

As screen primitives are rendered with ImGui, no video support is possible but one can load gifs instead:

show << Gif::Add("puppy_dance.gif");

Builder

c++ Gif::Add(std::string path, int fps,float scale,bool loop);
  • std::string path if relative then look in data path.
  • int fps speed at which the gif is played (default: 10 fps)
  • float scale gif scale
  • bool loop does the gif repeat (default: true)

Warning

Gifs are simply decomposed in images (in a cache) and then rendered sequentially, hence it easily takes a lot of space.