Fixed YUV texture update with a subrect in OpenGL ES 2.0 - thanks Sylvain!
authorSam Lantinga <slouken@libsdl.org>
Wed, 25 Jun 2014 21:06:47 -0700
changeset 89599dbfb553c555
parent 8958 ef544b7b4c4f
child 8960 bd5d3388da09
Fixed YUV texture update with a subrect in OpenGL ES 2.0 - thanks Sylvain!
src/render/opengles2/SDL_render_gles2.c
     1.1 --- a/src/render/opengles2/SDL_render_gles2.c	Wed Jun 25 22:38:40 2014 -0400
     1.2 +++ b/src/render/opengles2/SDL_render_gles2.c	Wed Jun 25 21:06:47 2014 -0700
     1.3 @@ -694,8 +694,8 @@
     1.4  
     1.5      data->glBindTexture(tdata->texture_type, tdata->texture_v);
     1.6      GLES2_TexSubImage2D(data, tdata->texture_type,
     1.7 -                    rect->x,
     1.8 -                    rect->y,
     1.9 +                    rect->x / 2,
    1.10 +                    rect->y / 2,
    1.11                      rect->w / 2,
    1.12                      rect->h / 2,
    1.13                      tdata->pixel_format,
    1.14 @@ -704,8 +704,8 @@
    1.15  
    1.16      data->glBindTexture(tdata->texture_type, tdata->texture_u);
    1.17      GLES2_TexSubImage2D(data, tdata->texture_type,
    1.18 -                    rect->x,
    1.19 -                    rect->y,
    1.20 +                    rect->x / 2,
    1.21 +                    rect->y / 2,
    1.22                      rect->w / 2,
    1.23                      rect->h / 2,
    1.24                      tdata->pixel_format,