Improve DrawQuads batching in the font render. (#1654)
Currently only identical glyphs are merged into one DrawQuads call. This fixes the comparison so that all glyphs with the same texture can be merged, which greatly improves the font rendering performance.
This commit is contained in:
+1
-1
@@ -422,7 +422,7 @@ void BitmapText::DrawChars( bool bUseStrokeTexture )
|
||||
for( int start = iStartGlyph; start < iEndGlyph; )
|
||||
{
|
||||
int end = start;
|
||||
while( end < iEndGlyph && m_vpFontPageTextures[end] == m_vpFontPageTextures[start] )
|
||||
while( end < iEndGlyph && *m_vpFontPageTextures[end] == *m_vpFontPageTextures[start] )
|
||||
end++;
|
||||
|
||||
bool bHaveATexture = !bUseStrokeTexture || (bUseStrokeTexture && m_vpFontPageTextures[start]->m_pTextureStroke);
|
||||
|
||||
Reference in New Issue
Block a user