Skip to content

Commit

Permalink
Fixed YUV texture update with a subrect in OpenGL ES 2.0 - thanks Syl…
Browse files Browse the repository at this point in the history
…vain!
  • Loading branch information
slouken committed Jun 26, 2014
1 parent 65023e0 commit 3d5f4a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/render/opengles2/SDL_render_gles2.c
Expand Up @@ -694,8 +694,8 @@ GLES2_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture,

data->glBindTexture(tdata->texture_type, tdata->texture_v);
GLES2_TexSubImage2D(data, tdata->texture_type,
rect->x,
rect->y,
rect->x / 2,
rect->y / 2,
rect->w / 2,
rect->h / 2,
tdata->pixel_format,
Expand All @@ -704,8 +704,8 @@ GLES2_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture,

data->glBindTexture(tdata->texture_type, tdata->texture_u);
GLES2_TexSubImage2D(data, tdata->texture_type,
rect->x,
rect->y,
rect->x / 2,
rect->y / 2,
rect->w / 2,
rect->h / 2,
tdata->pixel_format,
Expand Down

0 comments on commit 3d5f4a6

Please sign in to comment.