mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-26 12:59:18 +01:00
Fixed YUV texture update with a subrect in OpenGL ES 2.0 - thanks Sylvain!
This commit is contained in:
parent
65023e0767
commit
3d5f4a6901
@ -694,8 +694,8 @@ GLES2_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||||||
|
|
||||||
data->glBindTexture(tdata->texture_type, tdata->texture_v);
|
data->glBindTexture(tdata->texture_type, tdata->texture_v);
|
||||||
GLES2_TexSubImage2D(data, tdata->texture_type,
|
GLES2_TexSubImage2D(data, tdata->texture_type,
|
||||||
rect->x,
|
rect->x / 2,
|
||||||
rect->y,
|
rect->y / 2,
|
||||||
rect->w / 2,
|
rect->w / 2,
|
||||||
rect->h / 2,
|
rect->h / 2,
|
||||||
tdata->pixel_format,
|
tdata->pixel_format,
|
||||||
@ -704,8 +704,8 @@ GLES2_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||||||
|
|
||||||
data->glBindTexture(tdata->texture_type, tdata->texture_u);
|
data->glBindTexture(tdata->texture_type, tdata->texture_u);
|
||||||
GLES2_TexSubImage2D(data, tdata->texture_type,
|
GLES2_TexSubImage2D(data, tdata->texture_type,
|
||||||
rect->x,
|
rect->x / 2,
|
||||||
rect->y,
|
rect->y / 2,
|
||||||
rect->w / 2,
|
rect->w / 2,
|
||||||
rect->h / 2,
|
rect->h / 2,
|
||||||
tdata->pixel_format,
|
tdata->pixel_format,
|
||||||
|
Loading…
Reference in New Issue
Block a user