summaryrefslogtreecommitdiff
path: root/src/render/modernopenglgraphics.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-10 13:25:15 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-10 13:25:15 +0300
commit6e2867b935af242ca96767732e37b85a01620f42 (patch)
treefafad18b152737d1f53c73f1c423b38d8a91cfaf /src/render/modernopenglgraphics.cpp
parentfcb2f8b6fdfa683ce5ba319b46873a0b61c9c75f (diff)
downloadplus-6e2867b935af242ca96767732e37b85a01620f42.tar.gz
plus-6e2867b935af242ca96767732e37b85a01620f42.tar.bz2
plus-6e2867b935af242ca96767732e37b85a01620f42.tar.xz
plus-6e2867b935af242ca96767732e37b85a01620f42.zip
Use cliparea for texture drawing position in modernopengl.
Diffstat (limited to 'src/render/modernopenglgraphics.cpp')
-rw-r--r--src/render/modernopenglgraphics.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/render/modernopenglgraphics.cpp b/src/render/modernopenglgraphics.cpp
index fd700a9cf..ab8a9a787 100644
--- a/src/render/modernopenglgraphics.cpp
+++ b/src/render/modernopenglgraphics.cpp
@@ -297,9 +297,12 @@ bool ModernOpenGLGraphics::drawImageInline(const Image *const image,
bindTexture(GL_TEXTURE_2D, image->mGLImage);
setTexturingAndBlending(true);
+ const ClipRect &clipArea = mClipStack.top();
const SDL_Rect &imageRect = image->mBounds;
- drawQuad(image, imageRect.x, imageRect.y,
- dstX, dstY, imageRect.w, imageRect.h);
+ drawQuad(image,
+ imageRect.x, imageRect.y,
+ dstX + clipArea.xOffset, dstY + clipArea.yOffset,
+ imageRect.w, imageRect.h);
return true;
}