Commit a6adb039 authored by Sam Lantinga's avatar Sam Lantinga

Fixed an offset issue with glDrawTexiOES() when the viewport is set.

parent 51dad9cf
...@@ -701,7 +701,8 @@ GLES_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment