mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-09 02:13:09 +00:00
Fix unicode glyph color in per-vertex font rendering path
The upstream font color fix (commit be7e2ca9) switched from glColor4f to
per-vertex t->color() but renderUnicodeCharacter() still relied on glColor4f.
Set glColor4f to currentColor before rendering unicode glyphs and restore
white after, and re-apply t->color() when resuming the batched draw.
This commit is contained in:
parent
3ea2eda597
commit
712ae60a6f
|
|
@ -465,10 +465,15 @@ void Font::draw(const wstring &str, bool dropShadow, int initialColor)
|
|||
if (isUnicodeGlyphChar(c))
|
||||
{
|
||||
t->end();
|
||||
// renderUnicodeCharacter uses its own begin/end and relies on glColor
|
||||
glColor4f((currentColor >> 16 & 255) / 255.0F, (currentColor >> 8 & 255) / 255.0F,
|
||||
(currentColor & 255) / 255.0F, (currentColor >> 24 & 255) / 255.0F);
|
||||
renderUnicodeCharacter(c);
|
||||
glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
textures->bindTexture(m_textureLocation);
|
||||
lastBoundTexture = fontTexture;
|
||||
t->begin();
|
||||
t->color(currentColor & 0x00ffffff, (currentColor >> 24) & 255);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue