forked from bartvdbraak/blender
Getting BLF to work with the Blenderplayer.
This commit is contained in:
parent
4f4bd27512
commit
d43d5d7690
@ -6,4 +6,4 @@ sources = env.Glob('*.c')
|
||||
incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
|
||||
incs += ' #/intern/guardedalloc'
|
||||
|
||||
env.BlenderLib ( 'bf_editor_datafiles', sources, Split(incs), [], libtype=['core'], priority=[235] )
|
||||
env.BlenderLib ( 'bf_editor_datafiles', sources, Split(incs), [], libtype=['core', 'player'], priority=[235, 30] )
|
||||
|
@ -129,7 +129,7 @@ void WM_init(bContext *C, int argc, char **argv)
|
||||
ED_file_init(); /* for fsmenu */
|
||||
ED_init_node_butfuncs();
|
||||
|
||||
BLF_init(11, U.dpi);
|
||||
BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */
|
||||
BLF_lang_init();
|
||||
|
||||
/* get the default database, plus a wm */
|
||||
|
@ -70,7 +70,8 @@ IF(UNIX)
|
||||
bf_blenkernel
|
||||
bf_blenloader
|
||||
bf_blenpluginapi
|
||||
bf_blroutines
|
||||
bf_blroutines
|
||||
bf_editor_datafiles
|
||||
bf_converter
|
||||
bf_ketsji
|
||||
bf_bullet
|
||||
|
@ -116,8 +116,6 @@ struct Render *RE_GetRender(const char *name){return (struct Render *) NULL;}
|
||||
/* blenkernel */
|
||||
char btempdir[] = "";
|
||||
void RE_FreeRenderResult(struct RenderResult *res){}
|
||||
char datatoc_bmonofont_ttf[] = "";
|
||||
int datatoc_bmonofont_ttf_size = 0;
|
||||
struct RenderResult *RE_MultilayerConvert(void *exrhandle, int rectx, int recty){return (struct RenderResult *) NULL;}
|
||||
void RE_GetResultImage(struct Render *re, struct RenderResult *rr){}
|
||||
int RE_RenderInProgress(struct Render *re){return 0;}
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user