SDL_HINT_VIDEO_WIN_D3DCOMPILER(3)

✨ SDL_HINT_VIDEO_WIN_D3DCOMPILER ✨

okay bestie, welcome to the SDL_HINT_VIDEO_WIN_D3DCOMPILER page πŸ’– (it's a page from the SDL3 functions manual, in case you were wondering where you wandered into πŸ¦‹)


🌸 NAME 🌸

SDL_HINT_VIDEO_WIN_D3DCOMPILER β€” a variable that says which shader compiler to preload when you're rolling with the Chrome ANGLE binaries πŸ‘‘


✨ SYNOPSIS ✨

#include <SDL3/SDL_hints.h>

#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"

πŸ’… DESCRIPTION πŸ’…

so like. SDL has EGL and OpenGL ES2 support on Windows, right? and it gets there via the ANGLE project 🧚 You've got two different sets of binaries it can use β€” either the ones you compiled from source, or the ones that ship with the Chrome browser.

and in that second case (the Chrome ones), those binaries literally require that SDL loads a DLL providing the shader compiler. no DLL, no compiler, no vibes 😭

so you set this variable to tell SDL which one to load. The options are:

  • "d3dcompiler_46.dll" β€” best for Vista or later. (this is the default, main character energy fr fr)
  • "d3dcompiler_43.dll" β€” for XP support.
  • "none" β€” do not load any library at all. super useful if you compiled ANGLE from source and already included the compiler in your own binaries 🫢
⚠️ This hint should be set before SDL is initialized. Like, before. Not after. Timing is everything, bestie πŸ’€

🌈 AVAILABILITY 🌈

This hint is available since SDL 3.2.0. periodt. πŸ’œ


and that's the whole page, no notes πŸ‘‘ it came to you from Simple Directmedia Layer, all the way at version SDL 3.4.18, bestie β€” go forth and preload responsibly πŸŽ€βœ¨

πŸ“¦ where this page comes from