diff --git a/docs/README-migration.md b/docs/README-migration.md index 0c3cebf2b4..60762a395c 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 d0af9433f8..6058e47a05 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 8d1e690a1c..034080a36c 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 18b69c0127..b7c48f757f 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",