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:31:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-03-01 08:37:39 +0300
commita459ef2827f1bb9e6ce92b0946a7463061c9ac55 (patch)
treef09abc5323903e5c879a96705534284891d903a8 /source/blender/draw/DRW_engine.h
parent68015f9d397124b66fd8b435b729fbc0daa6e9ad (diff)
Fix T54190: Occlusion query select failed
By default select wasn't picking the nearest object, this could have been fixed by not clearing the depth buffer, but calling GPU_select_(begin/end) without the binded frame-buffer caused issues for depth-picking. So move GPU_select begin/end to a callback. This also has the advantage that only needs to populate the engines once to draw two passes. Note that cycling through objects fails with occlusion queries still, will fix shortly.
Diffstat (limited to 'source/blender/draw/DRW_engine.h')
-rw-r--r--source/blender/draw/DRW_engine.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/draw/DRW_engine.h b/source/blender/draw/DRW_engine.h
index 9ed8f776f34..4043f39b46d 100644
--- a/source/blender/draw/DRW_engine.h
+++ b/source/blender/draw/DRW_engine.h
@@ -88,6 +88,11 @@ typedef struct DRWUpdateContext {
void DRW_notify_view_update(const DRWUpdateContext *update_ctx);
void DRW_notify_id_update(const DRWUpdateContext *update_ctx, struct ID *id);
+
+typedef enum eDRWSelectStage { DRW_SELECT_PASS_PRE = 1, DRW_SELECT_PASS_POST, } eDRWSelectStage;
+typedef bool (*DRW_SelectPassFn)(
+ eDRWSelectStage stage, void *user_data);
+
void DRW_draw_view(const struct bContext *C);
void DRW_draw_render_loop_ex(
@@ -108,7 +113,8 @@ void DRW_draw_render_loop_offscreen(
void DRW_draw_select_loop(
struct Depsgraph *depsgraph,
struct ARegion *ar, struct View3D *v3d, const eObjectMode object_mode,
- bool use_obedit_skip, bool use_nearest, const struct rcti *rect);
+ bool use_obedit_skip, bool use_nearest, const struct rcti *rect,
+ DRW_SelectPassFn select_pass_fn, void *select_pass_user_data);
void DRW_draw_depth_loop(
struct Depsgraph *depsgraph,
struct ARegion *ar, struct View3D *v3d, const eObjectMode object_mode);