SDL: Enable npot texture wrapping if GL_OES_texture_npot is available (103a4)

From 103a4c4cb24de5b112277186cdf06649f7b5653e Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sat, 4 Apr 2026 08:12:51 -0700
Subject: [PATCH] Enable npot texture wrapping if GL_OES_texture_npot is
 available

(cherry picked from commit 173adc1bf6e1227b944d31b971f75d91d427a4bc)
---
 src/render/opengles2/SDL_render_gles2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index 52423884dc679..8f4dc4eb564b8 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -2464,7 +2464,9 @@ static bool GLES2_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL
 
     // Full NPOT textures (that can use GL_REPEAT, etc) are a core feature of GLES3,
     //  and an extension in GLES2.
-    if ((major < 3) && !SDL_GL_ExtensionSupported("GL_ARB_texture_non_power_of_two")) {
+    if (major < 3 &&
+        !SDL_GL_ExtensionSupported("GL_ARB_texture_non_power_of_two") &&
+        !SDL_GL_ExtensionSupported("GL_OES_texture_npot")) {
         renderer->npot_texture_wrap_unsupported = true;
     }