Merge branch 'master' into blender2.8

This commit is contained in:
2018-02-27 20:45:20 +11:00

View File

@@ -257,6 +257,7 @@ typedef struct GPUPickState {
/* Set after first draw */
bool is_init;
bool is_finalized;
unsigned int prev_id;
} gl;
@@ -364,6 +365,7 @@ void gpu_select_pick_begin(
#endif
ps->gl.is_init = false;
ps->gl.is_finalized = false;
ps->gl.prev_id = 0;
}
else {
@@ -535,6 +537,7 @@ void gpu_select_pick_finalize(void)
/* force finishing last pass */
gpu_select_pick_load_id(ps->gl.prev_id);
}
ps->gl.is_finalized = true;
}
unsigned int gpu_select_pick_end(void)
@@ -546,7 +549,9 @@ unsigned int gpu_select_pick_end(void)
#endif
if (ps->is_cached == false) {
gpu_select_pick_finalize();
if (ps->gl.is_finalized == false) {
gpu_select_pick_finalize();
}
gpuPopAttrib();
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);