SDL_HINT_FRA..._ACCELERATION(3)

πŸ’– NAME πŸ’–

SDL_HINT_FRAMEBUFFER_ACCELERATION β€” bestie, this is a variable that controls how 3D acceleration gets used to speed up the SDL screen surface. yes literally. she's the girl behind the curtain making your screen surface go zoom. ✨

(also hi, you're reading a page from the SDL3 FUNCTIONS manual, welcome to the function section, we have snacks πŸ“)


🌈 SYNOPSIS 🌈

#include <SDL3/SDL_hints.h>

#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"

that's it. that's the whole vibe. copy it exactly, no cap. 🫢


✨ DESCRIPTION ✨

okay so. SDL can try to accelerate the SDL screen surface by using streaming textures with a 3D rendering engine. it's giving main character energy for your framebuffer. and this variable? this variable is the one holding the aux cord deciding whether that happens and how. πŸ’…

you can set the variable to these values, and I need you to know all three, not just the first one:

  • "0" β€” disable 3D acceleration. she's staying home tonight. πŸ™ˆ
  • "1" β€” enable 3D acceleration, using the default renderer. this is the default, so if you do nothing, this is the energy you get. πŸ‘‘
  • "X" β€” enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.) pick your fighter. πŸŽ€
⚠️ important, bestie: this hint should be set before calling SDL_GetWindowSurface(). before. not after. not during. before. she does not do late arrivals. πŸ’€

πŸ¦‹ AVAILABILITY πŸ¦‹

this hint is available since SDL 3.2.0. if you're on something older, sorry queen, no acceleration lore for you. 😭


that's the whole page!! go forth and set your hints before you call SDL_GetWindowSurface(), mwah πŸ’œ

β€” written up for the Simple Directmedia Layer girlies, from the SDL 3.4.18 era, and yeah she lives in the SDL_HINT_FRA..._ACCELERATION(3) page, slay ⭐🌸

πŸ“¦ where this page comes from