SDL: Removed SDL_HINT_RENDER_OPENGL_SHADERS

From 7cb1ca60ecf06d231530a8453b2f264be150e7fe Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 11 Feb 2024 18:08:30 -0800
Subject: [PATCH] Removed SDL_HINT_RENDER_OPENGL_SHADERS

Shaders are always used if they are available.
---
 docs/README-migration.md          |  1 +
 include/SDL3/SDL_hints.h          | 11 -----------
 src/render/opengl/SDL_render_gl.c |  4 +---
 test/testautomation_hints.c       |  2 --
 4 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/docs/README-migration.md b/docs/README-migration.md
index 0c3cebf2b408..60762a395cfd 100644
--- a/docs/README-migration.md
+++ b/docs/README-migration.md
@@ -710,6 +710,7 @@ The following hints have been removed:
 * SDL_HINT_MOUSE_RELATIVE_SCALING - mouse coordinates are no longer automatically scaled by the SDL renderer
 * SDL_HINT_RENDER_BATCHING - Render batching is always enabled, apps should call SDL_FlushRenderer() before calling into a lower-level graphics API.
 * SDL_HINT_RENDER_LOGICAL_SIZE_MODE - the logical size mode is explicitly set with SDL_SetRenderLogicalPresentation()
+* SDL_HINT_RENDER_OPENGL_SHADERS - shaders are always used if they are available
 * SDL_HINT_THREAD_STACK_SIZE - the stack size can be specified using SDL_CreateThreadWithStackSize()
 * SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL - replaced with the "opengl" property in SDL_CreateWindowWithProperties()
 * SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN - replaced with the "vulkan" property in SDL_CreateWindowWithProperties()
diff --git a/include/SDL3/SDL_hints.h b/include/SDL3/SDL_hints.h
index d0af9433f8d3..6058e47a058f 100644
--- a/include/SDL3/SDL_hints.h
+++ b/include/SDL3/SDL_hints.h
@@ -1765,17 +1765,6 @@ extern "C" {
  */
 #define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"
 
-/**
- * A variable controlling whether the OpenGL render driver uses shaders if they are available.
- *
- * The variable can be set to the following values:
- *   "0"       - Disable shaders.
- *   "1"       - Enable shaders. (default)
- *
- * This hint should be set before creating a renderer.
- */
-#define SDL_HINT_RENDER_OPENGL_SHADERS      "SDL_RENDER_OPENGL_SHADERS"
-
 /**
  * A variable controlling whether vsync is automatically disabled if doesn't reach enough FPS.
  *
diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c
index 8d1e690a1c37..034080a36c92 100644
--- a/src/render/opengl/SDL_render_gl.c
+++ b/src/render/opengl/SDL_render_gl.c
@@ -1837,9 +1837,7 @@ static SDL_Renderer *GL_CreateRenderer(SDL_Window *window, SDL_PropertiesID crea
     }
 
     /* Check for shader support */
-    if (SDL_GetHintBoolean(SDL_HINT_RENDER_OPENGL_SHADERS, SDL_TRUE)) {
-        data->shaders = GL_CreateShaderContext();
-    }
+    data->shaders = GL_CreateShaderContext();
     SDL_LogInfo(SDL_LOG_CATEGORY_RENDER, "OpenGL shaders: %s",
                 data->shaders ? "ENABLED" : "DISABLED");
 #if SDL_HAVE_YUV
diff --git a/test/testautomation_hints.c b/test/testautomation_hints.c
index 18b69c012708..b7c48f757f94 100644
--- a/test/testautomation_hints.c
+++ b/test/testautomation_hints.c
@@ -16,7 +16,6 @@ static const char *HintsEnum[] = {
     SDL_HINT_ORIENTATIONS,
     SDL_HINT_RENDER_DIRECT3D_THREADSAFE,
     SDL_HINT_RENDER_DRIVER,
-    SDL_HINT_RENDER_OPENGL_SHADERS,
     SDL_HINT_RENDER_SCALE_QUALITY,
     SDL_HINT_RENDER_VSYNC,
     SDL_HINT_TIMER_RESOLUTION,
@@ -37,7 +36,6 @@ static const char *HintsVerbose[] = {
     "SDL_ORIENTATIONS",
     "SDL_RENDER_DIRECT3D_THREADSAFE",
     "SDL_RENDER_DRIVER",
-    "SDL_RENDER_OPENGL_SHADERS",
     "SDL_RENDER_SCALE_QUALITY",
     "SDL_RENDER_VSYNC",
     "SDL_TIMER_RESOLUTION",