[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [61095] trunk/blender/source/gameengine: BGE Rasterizer Cleanup: The Blenderplayer now loads the monospace font so it can properly draw the framerate and profile display .
Mitchell Stokes
mogurijin at gmail.com
Mon Nov 4 20:22:15 CET 2013
Revision: 61095
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=61095
Author: moguri
Date: 2013-11-04 19:22:15 +0000 (Mon, 04 Nov 2013)
Log Message:
-----------
BGE Rasterizer Cleanup: The Blenderplayer now loads the monospace font so it can properly draw the framerate and profile display.
Modified Paths:
--------------
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2013-11-04 19:22:10 UTC (rev 61094)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2013-11-04 19:22:15 UTC (rev 61095)
@@ -88,6 +88,8 @@
#include "BLF_translation.h"
extern int datatoc_bfont_ttf_size;
extern char datatoc_bfont_ttf[];
+extern int datatoc_bmonofont_ttf_size;
+extern char datatoc_bmonofont_ttf[];
#ifdef __cplusplus
}
@@ -475,6 +477,8 @@
BLF_lang_set("");
BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
+ if (blf_mono_font == -1)
+ blf_mono_font = BLF_load_mem_unique("monospace", (unsigned char*)datatoc_bmonofont_ttf, datatoc_bmonofont_ttf_size);
// Parse command line options
#if defined(DEBUG)
Modified: trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
===================================================================
--- trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp 2013-11-04 19:22:10 UTC (rev 61094)
+++ trunk/blender/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp 2013-11-04 19:22:15 UTC (rev 61095)
@@ -1498,18 +1498,14 @@
BLF_size(blf_mono_font, 11, 72);
BLF_position(blf_mono_font, (float)xco+1, (float)(height-yco-1), 0.0f);
BLF_draw(blf_mono_font, (char *)text, 65535);/* XXX, use real len */
-
- glColor3ub(255, 255, 255);
- BLF_position(blf_mono_font, (float)xco, (float)(height-yco), 0.0f);
- BLF_draw(blf_mono_font, (char *)text, 65535);
- } else {
- /* the actual drawing */
- glColor3ub(255, 255, 255);
- BLF_size(blf_mono_font, 11, 72);
- BLF_position(blf_mono_font, (float)xco, (float)(height-yco), 0.0f);
- BLF_draw(blf_mono_font, (char *)text, 65535); /* XXX, use real len */
}
+ /* the actual drawing */
+ glColor3ub(255, 255, 255);
+ BLF_size(blf_mono_font, 11, 72);
+ BLF_position(blf_mono_font, (float)xco, (float)(height-yco), 0.0f);
+ BLF_draw(blf_mono_font, (char *)text, 65535); /* XXX, use real len */
+
glMatrixMode(GL_PROJECTION);
glPopMatrix();
glMatrixMode(GL_MODELVIEW);
More information about the Bf-blender-cvs
mailing list