The compare function did not take into account the GL texture ID
when comparing materials. This could result in a renderer
merging glyph nodes into a single batch incorrectly.
Change-Id: Ib62c43f93fb1bbbc231197323dced4254ffa12aa
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
}
QRgb c1 = m_color.rgba();
QRgb c2 = other->m_color.rgba();
- return int(c2 < c1) - int(c1 < c2);
+ if (c1 != c2)
+ return int(c2 < c1) - int(c1 < c2);
+ int t0 = m_texture ? m_texture->textureId : -1;
+ int t1 = other->m_texture ? other->m_texture->textureId : -1;
+ return t0 - t1;
}