diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-10 11:26:36 (GMT) |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com> | 2010-02-10 11:26:36 (GMT) |
commit | 7a3b5e052ea94776a02cebc8174e753925878815 (patch) | |
tree | b107436b362f1e7c3b0e34e5f0b57860d39d52c3 /src/opengl | |
parent | 03abd6981d4a1aebec3b39f5768be3511ffbf0fb (diff) | |
parent | 004b09ffd423cd3100e346825dd7d730fc86d366 (diff) | |
download | Qt-7a3b5e052ea94776a02cebc8174e753925878815.zip Qt-7a3b5e052ea94776a02cebc8174e753925878815.tar.gz Qt-7a3b5e052ea94776a02cebc8174e753925878815.tar.bz2 |
Merge branch 'qstatictext-4.6' of git@scm.dev.nokia.troll.no:qt/qt-graphics-team into qstatictext-4.6
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 6cb76ee..53c627f 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -70,8 +70,12 @@ QGLTextureGlyphCache::~QGLTextureGlyphCache() } } -void QGLTextureGlyphCache::createTextureData(int width, int height) +void QGLTextureGlyphCache::createTextureData(int width, int unalteredHeight) { + extern int qt_next_power_of_two(int v); + // Set height to lowest POT number which is higher than or equal to height + int height = qt_next_power_of_two(unalteredHeight); + glGenTextures(1, &m_texture); glBindTexture(GL_TEXTURE_2D, m_texture); |