hints: replace SDL_HINT_VIDEO_X11_FORCE_EGL with platform-agnostic SDL_HINT_VIDEO_FORCE_EGL

This adds support for forcing the use of EGL on Windows and MacOS. The
SDL_HINT_VIDEO_X11_FORCE_EGL hint is retained for backwards
compatibility but is now deprecated.
This commit is contained in:
Steven Noonan 2022-08-25 19:35:41 -07:00
parent f430ef5ddc
commit 5a7c20b945
No known key found for this signature in database
GPG key ID: 408EEB508ED0CD4D
8 changed files with 58 additions and 24 deletions

View file

@ -1802,6 +1802,18 @@ extern "C" {
*/
#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
/**
* \brief A variable controlling whether the OpenGL context should be created
* with EGL by default
*
* This variable can be set to the following values:
* "0" - Use platform-specific GL context creation API (GLX, WGL, CGL, etc)
* "1" - Use EGL
*
* By default SDL will use the platform-specific GL context API when both are present.
*/
#define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
/**
* \brief A variable controlling whether X11 should use GLX or EGL by default
*
@ -1810,6 +1822,9 @@ extern "C" {
* "1" - Use EGL
*
* By default SDL will use GLX when both are present.
*
* \deprecated Use the platform-agnostic SDL_HINT_VIDEO_FORCE_EGL hint instead.
*
*/
#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"