SDL_CreateYUVOverlay(3)

πŸ’– SDL_CreateYUVOverlay(3) πŸ’–

okay bestie, this is a page from the SDL API Reference, and it's all about making a YUV video overlay. yes, the naming is a whole thing, we'll get to that. stay with me 🫢


✨ NAME ✨

SDL_CreateYUVOverlay β€” literally just: create a YUV video overlay. that's it, that's the job πŸ’…


🌸 SYNOPSIS 🌸

#include "SDL.h"

SDL_Overlay *SDL_CreateYUVOverlay(int width, int height, Uint32 format,
SDL_Surface *display);

πŸ¦‹ DESCRIPTION πŸ¦‹

so SDL_CreateYUVOverlay makes you a YUV overlay, and you get to pick the width, the height, and the format β€” head over to SDL_Overlay if you wanna see the list of formats that are actually available, because there IS a list and you should check it πŸ‘€ β€” and it does all this for the display you hand it. what comes back is a SDL_Overlay structure. slay. ✨

okay so here's the tea, and it's important: the word "overlay" is a misnomer. like, a lie, lowkey. because unless the overlay gets created in hardware, the contents of the display surface underneath the area where the overlay is shown are gonna get overwritten when the overlay is displayed. so yeah. not so much "overlaying" as "replacing", bestie. no cap 😭

πŸ’œ SEE ALSO πŸ’œ

  • SDL_Overlay
  • SDL_DisplayYUVOverlay
  • SDL_FreeYUVOverlay

and that's the whole page, periodt πŸ‘‘ this lil cutie is from SDL, dated Tue 11 Sep 2001, 23:01 β€” iconic vintage energy fr fr, she's been serving since 2001 and she still eats πŸ’–πŸŽ€

πŸ“¦ where this page comes from