Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_batch_presets.c
| Show First 20 Lines • Show All 235 Lines • ▼ Show 20 Lines | bool gpu_batch_presets_unregister(GPUBatch *preset_batch) | ||||
| return false; | return false; | ||||
| } | } | ||||
| void gpu_batch_presets_reset(void) | void gpu_batch_presets_reset(void) | ||||
| { | { | ||||
| BLI_mutex_lock(&g_presets_3d.mutex); | BLI_mutex_lock(&g_presets_3d.mutex); | ||||
| /* Reset vao caches for these every time we switch opengl context. | /* Reset vao caches for these every time we switch opengl context. | ||||
| * This way they will draw correctly for each window. */ | * This way they will draw correctly for each window. */ | ||||
| for (LinkData *link = presets_list.first; link; link = link->next) { | LISTBASE_FOREACH (LinkData *, link, &presets_list) { | ||||
| GPUBatch *preset = link->data; | GPUBatch *preset = link->data; | ||||
| GPU_batch_vao_cache_clear(preset); | GPU_batch_vao_cache_clear(preset); | ||||
| } | } | ||||
| BLI_mutex_unlock(&g_presets_3d.mutex); | BLI_mutex_unlock(&g_presets_3d.mutex); | ||||
| } | } | ||||
| void gpu_batch_presets_exit(void) | void gpu_batch_presets_exit(void) | ||||
| { | { | ||||
| Show All 9 Lines | |||||