Removed SDL_HINT_RENDER_OPENGL_SHADERS

Shaders are always used if they are available.
This commit is contained in:
Sam Lantinga 2024-02-11 18:08:30 -08:00
parent 9920e062d5
commit 7cb1ca60ec
4 changed files with 2 additions and 16 deletions

View file

@ -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_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_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_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_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_OPENGL - replaced with the "opengl" property in SDL_CreateWindowWithProperties()
* SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN - replaced with the "vulkan" property in SDL_CreateWindowWithProperties() * SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN - replaced with the "vulkan" property in SDL_CreateWindowWithProperties()

View file

@ -1765,17 +1765,6 @@ extern "C" {
*/ */
#define SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE" #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. * A variable controlling whether vsync is automatically disabled if doesn't reach enough FPS.
* *

View file

@ -1837,9 +1837,7 @@ static SDL_Renderer *GL_CreateRenderer(SDL_Window *window, SDL_PropertiesID crea
} }
/* Check for shader support */ /* 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", SDL_LogInfo(SDL_LOG_CATEGORY_RENDER, "OpenGL shaders: %s",
data->shaders ? "ENABLED" : "DISABLED"); data->shaders ? "ENABLED" : "DISABLED");
#if SDL_HAVE_YUV #if SDL_HAVE_YUV

View file

@ -16,7 +16,6 @@ static const char *HintsEnum[] = {
SDL_HINT_ORIENTATIONS, SDL_HINT_ORIENTATIONS,
SDL_HINT_RENDER_DIRECT3D_THREADSAFE, SDL_HINT_RENDER_DIRECT3D_THREADSAFE,
SDL_HINT_RENDER_DRIVER, SDL_HINT_RENDER_DRIVER,
SDL_HINT_RENDER_OPENGL_SHADERS,
SDL_HINT_RENDER_SCALE_QUALITY, SDL_HINT_RENDER_SCALE_QUALITY,
SDL_HINT_RENDER_VSYNC, SDL_HINT_RENDER_VSYNC,
SDL_HINT_TIMER_RESOLUTION, SDL_HINT_TIMER_RESOLUTION,
@ -37,7 +36,6 @@ static const char *HintsVerbose[] = {
"SDL_ORIENTATIONS", "SDL_ORIENTATIONS",
"SDL_RENDER_DIRECT3D_THREADSAFE", "SDL_RENDER_DIRECT3D_THREADSAFE",
"SDL_RENDER_DRIVER", "SDL_RENDER_DRIVER",
"SDL_RENDER_OPENGL_SHADERS",
"SDL_RENDER_SCALE_QUALITY", "SDL_RENDER_SCALE_QUALITY",
"SDL_RENDER_VSYNC", "SDL_RENDER_VSYNC",
"SDL_TIMER_RESOLUTION", "SDL_TIMER_RESOLUTION",