summaryrefslogtreecommitdiff
path: root/scene/main/viewport.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/viewport.h')
-rw-r--r--scene/main/viewport.h33
1 files changed, 21 insertions, 12 deletions
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 93e42f1838..a22a2acf49 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -160,6 +160,7 @@ public:
DEBUG_DRAW_CLUSTER_DECALS,
DEBUG_DRAW_CLUSTER_REFLECTION_PROBES,
DEBUG_DRAW_OCCLUDERS,
+ DEBUG_DRAW_MOTION_VECTORS,
};
enum DefaultCanvasItemTextureFilter {
@@ -203,7 +204,7 @@ private:
AudioListener2D *audio_listener_2d = nullptr;
Camera2D *camera_2d = nullptr;
- Set<CanvasLayer *> canvas_layers;
+ HashSet<CanvasLayer *> canvas_layers;
RID viewport;
RID current_canvas;
@@ -230,7 +231,6 @@ private:
Rect2 last_vp_rect;
bool transparent_bg = false;
- bool filter;
bool gen_mipmaps = false;
bool snap_controls_to_pixels = true;
@@ -259,9 +259,9 @@ private:
bool local_input_handled = false;
// Collider to frame
- Map<ObjectID, uint64_t> physics_2d_mouseover;
+ HashMap<ObjectID, uint64_t> physics_2d_mouseover;
// Collider & shape to frame
- Map<Pair<ObjectID, int>, uint64_t, PairSort<ObjectID, int>> physics_2d_shape_mouseover;
+ HashMap<Pair<ObjectID, int>, uint64_t, PairHash<ObjectID, int>> physics_2d_shape_mouseover;
// Cleans up colliders corresponding to old frames or all of them.
void _cleanup_mouseover_colliders(bool p_clean_all_frames, bool p_paused_only, uint64_t p_frame_reference = 0);
@@ -270,6 +270,7 @@ private:
Rect2i to_screen_rect;
StringName input_group;
StringName gui_input_group;
+ StringName shortcut_input_group;
StringName unhandled_input_group;
StringName unhandled_key_input_group;
@@ -291,6 +292,7 @@ private:
MSAA msaa = MSAA_DISABLED;
ScreenSpaceAA screen_space_aa = SCREEN_SPACE_AA_DISABLED;
+ bool use_taa = false;
Scaling3DMode scaling_3d_mode = SCALING_3D_MODE_BILINEAR;
float scaling_3d_scale = 1.0;
@@ -301,7 +303,7 @@ private:
bool use_occlusion_culling = false;
Ref<ViewportTexture> default_texture;
- Set<ViewportTexture *> viewport_textures;
+ HashSet<ViewportTexture *> viewport_textures;
SDFOversize sdf_oversize = SDF_OVERSIZE_120_PERCENT;
SDFScale sdf_scale = SDF_SCALE_50_PERCENT;
@@ -381,13 +383,14 @@ private:
bool disable_input = false;
- void _gui_call_input(Control *p_control, const Ref<InputEvent> &p_input);
+ bool _gui_call_input(Control *p_control, const Ref<InputEvent> &p_input);
void _gui_call_notification(Control *p_control, int p_what);
void _gui_sort_roots();
Control *_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_global, const Transform2D &p_xform, Transform2D &r_inv_xform);
void _gui_input_event(Ref<InputEvent> p_event);
+ void _gui_cleanup_internal_state(Ref<InputEvent> p_event);
_FORCE_INLINE_ Transform2D _get_input_pre_xform() const;
@@ -514,6 +517,9 @@ public:
void set_screen_space_aa(ScreenSpaceAA p_screen_space_aa);
ScreenSpaceAA get_screen_space_aa() const;
+ void set_use_taa(bool p_use_taa);
+ bool is_using_taa() const;
+
void set_scaling_3d_mode(Scaling3DMode p_scaling_3d_mode);
Scaling3DMode get_scaling_3d_mode() const;
@@ -546,7 +552,7 @@ public:
bool is_input_disabled() const;
Vector2 get_mouse_position() const;
- void warp_mouse(const Vector2 &p_pos);
+ void warp_mouse(const Vector2 &p_position);
void set_physics_object_picking(bool p_enable);
bool get_physics_object_picking();
@@ -600,8 +606,7 @@ public:
virtual DisplayServer::WindowID get_window_id() const = 0;
- void set_embed_subwindows_hint(bool p_embed);
- bool get_embed_subwindows_hint() const;
+ void set_embedding_subwindows(bool p_embed);
bool is_embedding_subwindows() const;
Viewport *get_parent_viewport() const;
@@ -609,11 +614,13 @@ public:
void pass_mouse_focus_to(Viewport *p_viewport, Control *p_control);
+ virtual Transform2D get_screen_transform() const;
+
#ifndef _3D_DISABLED
bool use_xr = false;
friend class AudioListener3D;
AudioListener3D *audio_listener_3d = nullptr;
- Set<AudioListener3D *> audio_listener_3d_set;
+ HashSet<AudioListener3D *> audio_listener_3d_set;
bool is_audio_listener_3d_enabled = false;
RID internal_audio_listener_3d;
AudioListener3D *get_audio_listener_3d() const;
@@ -648,7 +655,7 @@ public:
friend class Camera3D;
Camera3D *camera_3d = nullptr;
- Set<Camera3D *> camera_3d_set;
+ HashSet<Camera3D *> camera_3d_set;
Camera3D *get_camera_3d() const;
void _camera_3d_transform_changed_notify();
void _camera_3d_set(Camera3D *p_camera);
@@ -674,7 +681,7 @@ public:
Ref<World3D> get_world_3d() const;
Ref<World3D> find_world_3d() const;
void _own_world_3d_changed();
- void set_use_own_world_3d(bool p_world_3d);
+ void set_use_own_world_3d(bool p_use_own_world_3d);
bool is_using_own_world_3d() const;
void _propagate_enter_world_3d(Node *p_node);
void _propagate_exit_world_3d(Node *p_node);
@@ -732,6 +739,8 @@ public:
void set_clear_mode(ClearMode p_mode);
ClearMode get_clear_mode() const;
+ virtual Transform2D get_screen_transform() const override;
+
SubViewport();
~SubViewport();
};