Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/intern/draw_manager.c
| Show First 20 Lines • Show All 2,525 Lines • ▼ Show 20 Lines | /* setup callbacks */ | ||||
| BKE_gpencil_batch_cache_dirty_tag_cb = DRW_gpencil_batch_cache_dirty_tag; | BKE_gpencil_batch_cache_dirty_tag_cb = DRW_gpencil_batch_cache_dirty_tag; | ||||
| BKE_gpencil_batch_cache_free_cb = DRW_gpencil_batch_cache_free; | BKE_gpencil_batch_cache_free_cb = DRW_gpencil_batch_cache_free; | ||||
| } | } | ||||
| } | } | ||||
| extern struct GPUVertFormat *g_pos_format; /* draw_shgroup.c */ | extern struct GPUVertFormat *g_pos_format; /* draw_shgroup.c */ | ||||
| extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */ | extern struct GPUUniformBuffer *globals_ubo; /* draw_common.c */ | ||||
| extern struct GPUTexture *globals_ramp; /* draw_common.c */ | extern struct GPUTexture *globals_ramp; /* draw_common.c */ | ||||
| extern struct GPUTexture *globals_weight_ramp; /* draw_common.c */ | |||||
| void DRW_engines_free(void) | void DRW_engines_free(void) | ||||
| { | { | ||||
| DRW_opengl_context_enable(); | DRW_opengl_context_enable(); | ||||
| DRW_TEXTURE_FREE_SAFE(g_select_buffer.texture_depth); | DRW_TEXTURE_FREE_SAFE(g_select_buffer.texture_depth); | ||||
| GPU_FRAMEBUFFER_FREE_SAFE(g_select_buffer.framebuffer); | GPU_FRAMEBUFFER_FREE_SAFE(g_select_buffer.framebuffer); | ||||
| DRW_hair_free(); | DRW_hair_free(); | ||||
| Show All 9 Lines | for (DrawEngineType *type = DRW_engines.first; type; type = next) { | ||||
| if (type->engine_free) { | if (type->engine_free) { | ||||
| type->engine_free(); | type->engine_free(); | ||||
| } | } | ||||
| } | } | ||||
| DRW_UBO_FREE_SAFE(globals_ubo); | DRW_UBO_FREE_SAFE(globals_ubo); | ||||
| DRW_UBO_FREE_SAFE(view_ubo); | DRW_UBO_FREE_SAFE(view_ubo); | ||||
| DRW_TEXTURE_FREE_SAFE(globals_ramp); | DRW_TEXTURE_FREE_SAFE(globals_ramp); | ||||
| DRW_TEXTURE_FREE_SAFE(globals_weight_ramp); | |||||
| MEM_SAFE_FREE(g_pos_format); | MEM_SAFE_FREE(g_pos_format); | ||||
| MEM_SAFE_FREE(DST.RST.bound_texs); | MEM_SAFE_FREE(DST.RST.bound_texs); | ||||
| MEM_SAFE_FREE(DST.RST.bound_tex_slots); | MEM_SAFE_FREE(DST.RST.bound_tex_slots); | ||||
| MEM_SAFE_FREE(DST.RST.bound_ubos); | MEM_SAFE_FREE(DST.RST.bound_ubos); | ||||
| MEM_SAFE_FREE(DST.RST.bound_ubo_slots); | MEM_SAFE_FREE(DST.RST.bound_ubo_slots); | ||||
| DRW_opengl_context_disable(); | DRW_opengl_context_disable(); | ||||
| ▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines | |||||