diff --git a/engine/gl/gl_font.c b/engine/gl/gl_font.c index 0118d69c4..576aad7e1 100644 --- a/engine/gl/gl_font.c +++ b/engine/gl/gl_font.c @@ -355,7 +355,7 @@ void Font_Shutdown(void) } //we got too many chars and switched to a new plane - purge the chars in that plane -void Font_FlushPlane(font_t *f) +void Font_FlushPlane(void) { /* assumption: @@ -365,6 +365,13 @@ void Font_FlushPlane(font_t *f) //we've not broken anything yet, flush while we can Font_Flush(); + if (fontplanes.planechanged) + { + R_Upload(fontplanes.texnum[fontplanes.activeplane], NULL, TF_RGBA32, (void*)fontplanes.plane, NULL, PLANEWIDTH, PLANEHEIGHT, IF_2D|IF_NEAREST|IF_NOPICMIP|IF_NOMIPMAP|IF_NOGAMMA); + + fontplanes.planechanged = false; + } + fontplanes.activeplane++; fontplanes.activeplane = fontplanes.activeplane % FONTPLANES; fontplanes.planerowh = 0; @@ -401,7 +408,7 @@ static struct charcache_s *Font_LoadGlyphData(font_t *f, CHARIDXTYPE charidx, in } if (fontplanes.planerowy+(int)bmh >= PLANEHEIGHT) - Font_FlushPlane(f); + Font_FlushPlane(); if (fontplanes.newestchar) fontplanes.newestchar->nextchar = c;