summaryrefslogtreecommitdiff
path: root/scene/main/viewport.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-02 17:14:24 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-02 17:14:24 +0100
commit604abb434f6740935be669dc8152856412d9ca73 (patch)
treee89ab4a043a0cb05e12518531e45087fee442952 /scene/main/viewport.h
parent06c8e406e4975528dc72f1f07d70958bba5675fb (diff)
parentfcb9be66a252b59327ca113c2f6e2ba2f8bc8599 (diff)
Merge pull request #52350 from BimDav/viewport_canvas_cull
Added Viewport canvas cull mask feature
Diffstat (limited to 'scene/main/viewport.h')
-rw-r--r--scene/main/viewport.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 6f67649ea3..8911aea335 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -317,6 +317,8 @@ private:
SDFOversize sdf_oversize = SDF_OVERSIZE_120_PERCENT;
SDFScale sdf_scale = SDF_SCALE_50_PERCENT;
+ uint32_t canvas_cull_mask = 0xffffffff; // by default show everything
+
enum SubWindowDrag {
SUB_WINDOW_DRAG_DISABLED,
SUB_WINDOW_DRAG_MOVE,
@@ -639,6 +641,12 @@ public:
void pass_mouse_focus_to(Viewport *p_viewport, Control *p_control);
+ void set_canvas_cull_mask(uint32_t p_layers);
+ uint32_t get_canvas_cull_mask() const;
+
+ void set_canvas_cull_mask_bit(uint32_t p_layer, bool p_enable);
+ bool get_canvas_cull_mask_bit(uint32_t p_layer) const;
+
virtual Transform2D get_screen_transform() const;
#ifndef _3D_DISABLED