Commit 958e5d5b34016f8e88728de75715363ab7daa751

Sylvain Becker 2021-01-11T10:01:24

SDL_UpdateNVTexture: fixed pitch/bpp for GLES2 (bug #5430)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c
index ce9bf26..f0801ab 100644
--- a/src/render/opengles2/SDL_render_gles2.c
+++ b/src/render/opengles2/SDL_render_gles2.c
@@ -1787,7 +1787,7 @@ GLES2_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture,
             (rect->h + 1) / 2,
             GL_LUMINANCE_ALPHA,
             GL_UNSIGNED_BYTE,
-            UVplane, UVpitch / 2, 1);
+            UVplane, UVpitch, 2);
 
     data->glBindTexture(tdata->texture_type, tdata->texture);
     GLES2_TexSubImage2D(data, tdata->texture_type,