Skip to content

Commit 173adc1

Browse files
committed
Enable npot texture wrapping if GL_OES_texture_npot is available
1 parent 41c3a91 commit 173adc1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/render/opengles2/SDL_render_gles2.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2464,7 +2464,9 @@ static bool GLES2_CreateRenderer(SDL_Renderer *renderer, SDL_Window *window, SDL
24642464

24652465
// Full NPOT textures (that can use GL_REPEAT, etc) are a core feature of GLES3,
24662466
// and an extension in GLES2.
2467-
if ((major < 3) && !SDL_GL_ExtensionSupported("GL_ARB_texture_non_power_of_two")) {
2467+
if (major < 3 &&
2468+
!SDL_GL_ExtensionSupported("GL_ARB_texture_non_power_of_two") &&
2469+
!SDL_GL_ExtensionSupported("GL_OES_texture_npot")) {
24682470
renderer->npot_texture_wrap_unsupported = true;
24692471
}
24702472

0 commit comments

Comments
 (0)