Fixed an offset issue with glDrawTexiOES() when the viewport is set.
This commit is contained in:
parent
51dad9cf5e
commit
a6adb03997
1 changed files with 3 additions and 2 deletions
|
@ -701,7 +701,8 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
|
||||||
cropRect[3] = -srcrect->h;
|
cropRect[3] = -srcrect->h;
|
||||||
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES,
|
glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES,
|
||||||
cropRect);
|
cropRect);
|
||||||
glDrawTexiOES(dstrect->x, h - dstrect->y - dstrect->h, 0,
|
glDrawTexiOES(renderer->viewport.x + dstrect->x,
|
||||||
|
h - (renderer->viewport.y + dstrect->y) - dstrect->h, 0,
|
||||||
dstrect->w, dstrect->h);
|
dstrect->w, dstrect->h);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue