summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp6
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);