SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES(3)

πŸ’– NAME πŸ’–

SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES β€” bestie, this is the hint that decides whether the offscreen video driver is out here saving its output frames or just living its truth invisibly ✨


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_hints.h>

#define SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES"

πŸŽ€ DESCRIPTION πŸŽ€

Okay so, real talk: this one only saves frames that were made with software rendering. Accelerated OpenGL rendering? Not it. Those frames are NOT getting saved, no matter how much you beg. πŸ™ˆ

Now for the values, because the way this hint works is genuinely so simple:

  • "0" β€” video frames are not saved to disk. This is the default, the chill setting, the "we're just vibing" option. 😌
  • "1" β€” video frames are saved to files, and the format is "SDL_windowX-Y.bmp", where X is the window ID and Y is the frame number. So like, every single frame gets its own lil bmp moment. πŸ’…
Heads up bestie: this hint can be set anytime. No weird timing rules, no "you had to do it before init" nonsense. Set it whenever. 🫢

⭐ AVAILABILITY ⭐

This hint has been around since SDL 3.2.0. So if you're on something older… no frames for you, sorry babe 😭


and that's the whole page, fr fr β€” go forth and save those frames (or don't, "0" is valid too, we don't judge) πŸ¦‹βœ¨

Simple Directmedia Layer β€” SDL 3.4.18 β€” πŸ’œ stay iconic, hydrate, and read your manpages πŸ’œ

πŸ“¦ where this page comes from