Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2010-11-12 10:16:33 +0300
committerMitchell Stokes <mogurijin@gmail.com>2010-11-12 10:16:33 +0300
commitd43d5d769059f0d6f8d90a0df71ac65728fa8de4 (patch)
tree5328be7de5674927bbf3a5618b7e72bae677b788 /source/gameengine
parent4f4bd275129f12ef3a8f021d95a5423985752f7b (diff)
Getting BLF to work with the Blenderplayer.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/GamePlayer/ghost/CMakeLists.txt1
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp10
-rw-r--r--source/gameengine/GamePlayer/ghost/SConscript1
3 files changed, 12 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/CMakeLists.txt b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
index e02a8a53ba2..824b11d77f8 100644
--- a/source/gameengine/GamePlayer/ghost/CMakeLists.txt
+++ b/source/gameengine/GamePlayer/ghost/CMakeLists.txt
@@ -36,6 +36,7 @@ SET(INC
../../../../source/gameengine/Converter
../../../../source/blender/imbuf
../../../../source/gameengine/Ketsji
+ ../../../../source/blender/blenfont
../../../../source/blender/blenlib
../../../../source/blender/blenkernel
../../../../source/blender/readblenfile
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 45eea75eb2f..d9aaa56b19e 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -72,6 +72,11 @@ extern "C"
extern char bprogname[]; /* holds a copy of argv[0], from creator.c */
extern char btempdir[]; /* use this to store a valid temp directory */
+// For BLF
+#include "BLF_api.h"
+extern int datatoc_bfont_ttf_size;
+extern char datatoc_bfont_ttf[];
+
#ifdef __cplusplus
}
#endif // __cplusplus
@@ -389,6 +394,11 @@ int main(int argc, char** argv)
GEN_init_messaging_system();
IMB_init();
+
+ // Setup builtin font for BLF (mostly copied from creator.c, wm_init_exit.c and interface_style.c)
+ BLF_init(11, U.dpi);
+ BLF_lang_init();
+ BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
// Parse command line options
#if defined(DEBUG)
diff --git a/source/gameengine/GamePlayer/ghost/SConscript b/source/gameengine/GamePlayer/ghost/SConscript
index d2224884f7f..eb3d50a49bd 100644
--- a/source/gameengine/GamePlayer/ghost/SConscript
+++ b/source/gameengine/GamePlayer/ghost/SConscript
@@ -19,6 +19,7 @@ incs = ['.',
'#source/gameengine/Converter',
'#source/blender/imbuf',
'#source/gameengine/Ketsji',
+ '#source/blender/blenfont',
'#source/blender/blenlib',
'#source/blender/blenkernel',
'#source/blender/readblenfile',