Skip to content

Commit

Permalink
Fixed: Font renderer drawing of gitter fx
Browse files Browse the repository at this point in the history
Gitter for a fragment of a multipart text block was drawn with along the
with each fragment rather than in a separate drawing pass. So any case
scaled text (such as that used in DOOM's game menu) would see the glitter
for the previous text fragment drawn over by the character patches for
the current fragment.

Clearly we need to start thinking about optimizing the font renderer...
  • Loading branch information
danij-deng committed Sep 27, 2011
1 parent 79e1e92 commit 136e947
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions doomsday/engine/portable/src/rend_font.c
Expand Up @@ -1163,20 +1163,19 @@ void FR_DrawText3(const char* text, int x, int y, int alignFlags, short origText
// We need to change the current color, so remember for restore.
glGetFloatv(GL_CURRENT_COLOR, origColor);

for(pass = ((origTextFlags & DTF_NO_SHADOW) != 0? 1 : 0); pass < 2; ++pass)
for(pass = ((origTextFlags & DTF_NO_SHADOW) != 0? 1 : 0);
pass < ((origTextFlags & DTF_NO_GLITTER) != 0? 2 : 3); ++pass)
{
// Configure the next pass.
cx = (float) x;
cy = (float) y;
curCase = -1;
charCount = 0;
if(pass == 0)
switch(pass)
{
textFlags = origTextFlags | (DTF_NO_GLITTER|DTF_NO_CHARACTER);
}
else
{
textFlags = origTextFlags | (DTF_NO_SHADOW);
case 0: textFlags = origTextFlags | (DTF_NO_GLITTER|DTF_NO_CHARACTER); break;
case 1: textFlags = origTextFlags | (DTF_NO_SHADOW |DTF_NO_GLITTER); break;
case 2: textFlags = origTextFlags | (DTF_NO_SHADOW |DTF_NO_CHARACTER); break;
}

// Apply defaults.
Expand Down

0 comments on commit 136e947

Please sign in to comment.