SDL_HINT_VID...BLE_XSYNC_EXT(3)
π SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT π
okay bestie, pull up a chair, we're reading a page from the SDL3 FUNCTIONS manual β it's SDL_HINT_VID...BLE_XSYNC_EXT(3) and it's lowkey iconic for one very specific reason. let's get into it π¦
β¨ NAME β¨
SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT β a variable controlling whether the X Synchronization Extension is enabled. that's it, that's the whole vibe check π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_hints.h>
#define SDL_HINT_VIDEO_X11_ENABLE_XSYNC_EXT "SDL_VIDEO_X11_ENABLE_XSYNC_EXT"
like, that's the include, that's the define, copy it exactly bestie, character for character, no cap π
π DESCRIPTION π
so here's the tea: if you set this hint, you can get smoother window resizing when you're rendering with OpenGL. slay. BUT. and this is a big but π
there are some conditions, and she is not flexible about them:
- It is only activated on windows created with the
SDL_WINDOW_OPENGLflag. (and windows using an SDL OpenGL renderer have this automatically set, so those girlies are already covered π«Ά) - When it's activated, presentation must be done with
SDL_GL_SwapWindow()
(SDL_RenderPresent() calls this internally for OpenGL renderers as well, so you're fine there too.)
β οΈ warning bestie, listen to me: enabling this and presenting via an external mechanism will result in sync requests not being acked, and hangs and other odd window behavior may result. not cute. not the moment. π
The variable can be set to the following values:
"0": The X Synchronization Extension is disabled. (default)"1": The X Synchronization Extension is enabled.
and the timing?? this hint should be set before creating a window. before. like, ahead of time. not after. she needs to know in advance, she's a planner π
π AVAILABILITY π
This hint is available since SDL 3.4.10. yes, that's a real version, she's been around, she's established β
and that's the whole page, no notes, go forth and resize smoothly π¦β¨
Simple Directmedia Layer β SDL 3.4.18 β SDL_HINT_VID...BLE_XSYNC_EXT(3), mwah, that's the sign-off, love u, bye ππ
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms