Changeset View
Changeset View
Standalone View
Standalone View
source/blender/windowmanager/intern/wm_init_exit.c
| Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | void WM_init(bContext *C, int argc, const char **argv) | ||||
| /* Enforce loading the UI for the initial homefile */ | /* Enforce loading the UI for the initial homefile */ | ||||
| G.fileflags &= ~G_FILE_NO_UI; | G.fileflags &= ~G_FILE_NO_UI; | ||||
| /* get the default database, plus a wm */ | /* get the default database, plus a wm */ | ||||
| wm_homefile_read(C, NULL, G.factory_startup, NULL); | wm_homefile_read(C, NULL, G.factory_startup, NULL); | ||||
| BLF_lang_set(NULL); | BLF_lang_set(NULL); | ||||
| if (!G.background) { | |||||
| GPU_init(); | |||||
| GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP)); | |||||
| GPU_set_linear_mipmap(true); | |||||
| GPU_set_anisotropic(U.anisotropic_filter); | |||||
| GPU_set_gpu_mipmapping(U.use_gpu_mipmap); | |||||
| UI_init(); | |||||
| } | |||||
| ED_spacemacros_init(); | ED_spacemacros_init(); | ||||
| /* note: there is a bug where python needs initializing before loading the | /* note: there is a bug where python needs initializing before loading the | ||||
| * startup.blend because it may contain PyDrivers. It also needs to be after | * startup.blend because it may contain PyDrivers. It also needs to be after | ||||
| * initializing space types and other internal data. | * initializing space types and other internal data. | ||||
| * | * | ||||
| * However cant redo this at the moment. Solution is to load python | * However cant redo this at the moment. Solution is to load python | ||||
| * before wm_homefile_read() or make py-drivers check if python is running. | * before wm_homefile_read() or make py-drivers check if python is running. | ||||
| Show All 9 Lines | #else | ||||
| (void)argv; /* unused */ | (void)argv; /* unused */ | ||||
| #endif | #endif | ||||
| if (!G.background && !wm_start_with_console) | if (!G.background && !wm_start_with_console) | ||||
| GHOST_toggleConsole(3); | GHOST_toggleConsole(3); | ||||
| wm_init_reports(C); /* reports cant be initialized before the wm */ | wm_init_reports(C); /* reports cant be initialized before the wm */ | ||||
| if (!G.background) { | |||||
| GPU_init(); | |||||
| GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP)); | |||||
| GPU_set_linear_mipmap(true); | |||||
| GPU_set_anisotropic(U.anisotropic_filter); | |||||
| GPU_set_gpu_mipmapping(U.use_gpu_mipmap); | |||||
| UI_init(); | |||||
| } | |||||
| clear_matcopybuf(); | clear_matcopybuf(); | ||||
| ED_render_clear_mtex_copybuf(); | ED_render_clear_mtex_copybuf(); | ||||
| // glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | // glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | ||||
| ED_preview_init_dbase(); | ED_preview_init_dbase(); | ||||
| wm_read_history(); | wm_read_history(); | ||||
| ▲ Show 20 Lines • Show All 351 Lines • Show Last 20 Lines | |||||