Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_init_exit.c
| Show All 40 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_extensions_init(); /* must come first */ | ||||
| gpu_codegen_init(); | gpu_codegen_init(); | ||||
| gpu_framebuffer_module_init(); | gpu_framebuffer_module_init(); | ||||
| if (G.debug & G_DEBUG_GPU) { | if (G.debug & G_DEBUG_GPU) { | ||||
| gpu_debug_init(); | gpu_debug_init(); | ||||
| } | } | ||||
| Show All 19 Lines | void GPU_exit(void) | ||||
| if (G.debug & G_DEBUG_GPU) { | if (G.debug & G_DEBUG_GPU) { | ||||
| gpu_debug_exit(); | gpu_debug_exit(); | ||||
| } | } | ||||
| gpu_framebuffer_module_exit(); | gpu_framebuffer_module_exit(); | ||||
| gpu_codegen_exit(); | gpu_codegen_exit(); | ||||
| gpu_extensions_exit(); /* must come last */ | gpu_extensions_exit(); | ||||
| gpu_platform_exit(); /* must come last */ | |||||
| initialized = false; | initialized = false; | ||||
| } | } | ||||
| bool GPU_is_initialized(void) | bool GPU_is_initialized(void) | ||||
| { | { | ||||
| return initialized; | return initialized; | ||||
| } | } | ||||