Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/intern/gpu_select_pick.c
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| bool gpu_select_pick_load_id(uint id) | bool gpu_select_pick_load_id(uint id, bool end) | ||||
| { | { | ||||
| GPUPickState *ps = &g_pick_state; | GPUPickState *ps = &g_pick_state; | ||||
| if (ps->gl.is_init) { | if (ps->gl.is_init) { | ||||
| if (id == ps->gl.prev_id) { | if (id == ps->gl.prev_id && !end) { | ||||
| /* No need to read if we are still drawing for the same id since | /* No need to read if we are still drawing for the same id since | ||||
| * all these depths will be merged / deduplicated in the end. */ | * all these depths will be merged / deduplicated in the end. */ | ||||
| return true; | return true; | ||||
| Context not available. | |||||
| if (ps->is_cached == false) { | if (ps->is_cached == false) { | ||||
| if (ps->gl.is_init) { | if (ps->gl.is_init) { | ||||
| /* force finishing last pass */ | /* force finishing last pass */ | ||||
| gpu_select_pick_load_id(ps->gl.prev_id); | gpu_select_pick_load_id(ps->gl.prev_id, true); | ||||
| } | } | ||||
| gpuPopAttr(); | gpuPopAttr(); | ||||
| glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); | glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); | ||||
| Context not available. | |||||