Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-03-01 08:48:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-01 08:48:13 +0300
commitb5cc55c8220480ee1b17405265512d9a16f46004 (patch)
treeb9df8f0f70b218f156c30118ce4fc41fac68d19c /source/blender/gpu/intern/gpu_select_pick.c
parenta459ef2827f1bb9e6ce92b0946a7463061c9ac55 (diff)
parent172614fb7dac799d373e778a541e8d9f78228221 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/gpu/intern/gpu_select_pick.c')
-rw-r--r--source/blender/gpu/intern/gpu_select_pick.c22
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 9aff708d32a..4aef80934ad 100644
--- a/source/blender/gpu/intern/gpu_select_pick.c
+++ b/source/blender/gpu/intern/gpu_select_pick.c
@@ -257,7 +257,6 @@ typedef struct GPUPickState {
/* Set after first draw */
bool is_init;
- bool is_finalized;
uint prev_id;
} gl;
@@ -368,7 +367,6 @@ void gpu_select_pick_begin(
#endif
ps->gl.is_init = false;
- ps->gl.is_finalized = false;
ps->gl.prev_id = 0;
}
else {
@@ -529,20 +527,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;
@@ -552,10 +536,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);
}
-
gpuPopAttrib();
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
}