Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_init_exit.c
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| void GPU_init(void) | void GPU_init(void) | ||||
| { | { | ||||
| /* can't avoid calling this multiple times, see wm_window_ghostwindow_add */ | /* can't avoid calling this multiple times, see wm_window_ghostwindow_add */ | ||||
| if (initialized) { | if (initialized) { | ||||
| return; | return; | ||||
| } | } | ||||
| initialized = true; | initialized = true; | ||||
| gpu_platform_init(); | |||||
| gpu_extensions_init(); /* must come first */ | |||||
| gpu_codegen_init(); | gpu_codegen_init(); | ||||
| gpu_material_library_init(); | gpu_material_library_init(); | ||||
| gpu_batch_init(); | gpu_batch_init(); | ||||
| if (!G.background) { | if (!G.background) { | ||||
| immInit(); | immInit(); | ||||
| Show All 14 Lines | if (!G.background) { | ||||
| immDestroy(); | immDestroy(); | ||||
| } | } | ||||
| gpu_batch_exit(); | gpu_batch_exit(); | ||||
| gpu_material_library_exit(); | gpu_material_library_exit(); | ||||
| gpu_codegen_exit(); | gpu_codegen_exit(); | ||||
| gpu_extensions_exit(); | |||||
| gpu_platform_exit(); /* must come last */ | |||||
| initialized = false; | initialized = false; | ||||
| } | } | ||||
| bool GPU_is_init(void) | bool GPU_is_init(void) | ||||
| { | { | ||||
| return initialized; | return initialized; | ||||
| } | } | ||||