diff options
author | Simon Hausmann <[email protected]> | 2014-09-08 13:10:21 +0200 |
---|---|---|
committer | Simon Hausmann <[email protected]> | 2014-09-08 13:10:21 +0200 |
commit | 38fe461e2cc4bf3aebcb98d25c643bfe6653120a (patch) | |
tree | b625415f33791ce0202538396509379fd04b111a /src/quick/scenegraph/util/qsgatlastexture.cpp | |
parent | f9ee33f9683a4cd4d1a2e41efa6e8d124e9d731d (diff) | |
parent | f7c3035fa1d965dceb36892122683a5ceb6cab89 (diff) |
Merge remote-tracking branch 'origin/5.3' into 5.4
Conflicts:
.qmake.conf
src/qml/jsruntime/qv4arraydata.cpp
src/quick/scenegraph/util/qsgatlastexture.cpp
Change-Id: Ic4c96066d5c37dcf0d5446baed590ea005d445ce
Diffstat (limited to 'src/quick/scenegraph/util/qsgatlastexture.cpp')
-rw-r--r-- | src/quick/scenegraph/util/qsgatlastexture.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/quick/scenegraph/util/qsgatlastexture.cpp b/src/quick/scenegraph/util/qsgatlastexture.cpp index c396507ab6..a9cbbe1dc3 100644 --- a/src/quick/scenegraph/util/qsgatlastexture.cpp +++ b/src/quick/scenegraph/util/qsgatlastexture.cpp @@ -307,7 +307,16 @@ void Atlas::uploadBgra(Texture *texture) funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, r.x() + iw + 1, r.y() + 1, 1, ih, m_externalFormat, GL_UNSIGNED_BYTE, dst); // Inner part of the image.... - funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, m_externalFormat, GL_UNSIGNED_BYTE, src); + if (bpl != iw) { + int sy = r.y() + 1; + int ey = sy + r.height() - 2; + for (int y = sy; y < ey; ++y) { + funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, r.x() + 1, y, r.width() - 2, 1, m_externalFormat, GL_UNSIGNED_BYTE, src); + src += bpl; + } + } else { + funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, r.x() + 1, r.y() + 1, r.width() - 2, r.height() - 2, m_externalFormat, GL_UNSIGNED_BYTE, src); + } } void Atlas::bind(QSGTexture::Filtering filtering) |