Skip to content

Commit

Permalink
Merge pull request #6 from morturp/patch-2
Browse files Browse the repository at this point in the history
out seems to be unnecessarily large for one byte per pixel
  • Loading branch information
zturtleman committed Jul 18, 2013
2 parents 9c2ce77 + 7b47c6c commit 3cd8b49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/renderercommon/tr_font.c
Expand Up @@ -436,12 +436,12 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {
// make a 256x256 image buffer, once it is full, register it, clean it and keep going
// until all glyphs are rendered

out = ri.Malloc(1024*1024);
out = ri.Malloc(256*256);
if (out == NULL) {
ri.Printf(PRINT_WARNING, "RE_RegisterFont: ri.Malloc failure during output image creation.\n");
return;
}
Com_Memset(out, 0, 1024*1024);
Com_Memset(out, 0, 256*256);

maxHeight = 0;

Expand Down Expand Up @@ -500,7 +500,7 @@ void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font) {
Q_strncpyz(font->glyphs[j].shaderName, name, sizeof(font->glyphs[j].shaderName));
}
lastStart = i;
Com_Memset(out, 0, 1024*1024);
Com_Memset(out, 0, 256*256);
xOut = 0;
yOut = 0;
ri.Free(imageBuff);
Expand Down

0 comments on commit 3cd8b49

Please sign in to comment.