diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-03-01 08:41:50 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-03-01 08:43:45 +0300 |
commit | 172614fb7dac799d373e778a541e8d9f78228221 (patch) | |
tree | b77774af3f19bb4b7fe5262cb8350e4603d98657 /source/blender/gpu/intern/gpu_select_pick.c | |
parent | 7f86afec9d6799e22127c53d9d0805a87462fc08 (diff) |
GPU_select: remove unused finalize function
Changed 2.8x code so this is no longer needed.
Diffstat (limited to 'source/blender/gpu/intern/gpu_select_pick.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_select_pick.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c index 703035483dd..3e65e2987e6 100644 --- a/source/blender/gpu/intern/gpu_select_pick.c +++ b/source/blender/gpu/intern/gpu_select_pick.c @@ -255,7 +255,6 @@ typedef struct GPUPickState { /* Set after first draw */ bool is_init; - bool is_finalized; uint prev_id; } gl; @@ -370,7 +369,6 @@ void gpu_select_pick_begin( #endif ps->gl.is_init = false; - ps->gl.is_finalized = false; ps->gl.prev_id = 0; } else { @@ -531,20 +529,6 @@ bool gpu_select_pick_load_id(uint id) return true; } - /** - * (Optional), call before 'gpu_select_pick_end' if GL context is not kept. - * is not compatible with regular select case. - * */ -void gpu_select_pick_finalize(void) -{ - GPUPickState *ps = &g_pick_state; - if (ps->gl.is_init) { - /* force finishing last pass */ - gpu_select_pick_load_id(ps->gl.prev_id); - } - ps->gl.is_finalized = true; -} - uint gpu_select_pick_end(void) { GPUPickState *ps = &g_pick_state; @@ -554,10 +538,10 @@ uint gpu_select_pick_end(void) #endif if (ps->is_cached == false) { - if (ps->gl.is_finalized == false) { - gpu_select_pick_finalize(); + if (ps->gl.is_init) { + /* force finishing last pass */ + gpu_select_pick_load_id(ps->gl.prev_id); } - glPopAttrib(); glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE); } |