diff options
Diffstat (limited to 'src/quick/scenegraph/qsgdistancefieldglyphnode.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdistancefieldglyphnode.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp index 876a9ea9ad..a9faf12096 100644 --- a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp +++ b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp @@ -46,7 +46,7 @@ QT_BEGIN_NAMESPACE -QSGDistanceFieldGlyphNode::QSGDistanceFieldGlyphNode(QSGContext *context) +QSGDistanceFieldGlyphNode::QSGDistanceFieldGlyphNode(QSGRenderContext *context) : m_glyphNodeType(RootGlyphNode) , m_context(context) , m_material(0) @@ -235,7 +235,12 @@ void QSGDistanceFieldGlyphNode::updateGeometry() if (texture->textureId && !m_texture) m_texture = texture; - if (m_texture != texture) { + // As we use UNSIGNED_SHORT indexing in the geometry, we overload the + // "glyphsInOtherTextures" concept as overflow for if there are more than + // 65536 vertices to render which would otherwise exceed the maximum index + // size. This will cause sub-nodes to be recursively created to handle any + // number of glyphs. + if (m_texture != texture || vp.size() >= 65536) { if (texture->textureId) { GlyphInfo &glyphInfo = glyphsInOtherTextures[texture]; glyphInfo.indexes.append(glyphIndex); |