summaryrefslogtreecommitdiff
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/scene_tree.cpp4
-rw-r--r--scene/main/viewport.cpp10
-rw-r--r--scene/main/viewport.h2
3 files changed, 12 insertions, 4 deletions
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index f74bf161f0..5ee286c2d5 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -418,12 +418,12 @@ void SceneTree::input_event(const Ref<InputEvent> &p_event) {
if (!input_handled) {
call_group_flags(GROUP_CALL_REALTIME, "_viewports", "_vp_unhandled_input", ev); //special one for GUI, as controls use their own process check
- input_handled = true;
_flush_ugc();
+ // input_handled = true; - no reason to set this as handled
root_lock--;
//MessageQueue::get_singleton()->flush(); //flushing here causes UI and other places slowness
} else {
- input_handled = true;
+ // input_handled = true; - no reason to set this as handled
root_lock--;
}
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 1fc2d4b16e..d864b0f763 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -69,6 +69,8 @@ void ViewportTexture::setup_local_to_scene() {
ERR_FAIL_COND(!vp);
vp->viewport_textures.insert(this);
+
+ VS::get_singleton()->texture_set_proxy(proxy, vp->texture_rid);
}
void ViewportTexture::set_viewport_path_in_scene(const NodePath &p_path) {
@@ -105,8 +107,8 @@ Size2 ViewportTexture::get_size() const {
}
RID ViewportTexture::get_rid() const {
- ERR_FAIL_COND_V(!vp, RID());
- return vp->texture_rid;
+ //ERR_FAIL_COND_V(!vp, RID());
+ return proxy;
}
bool ViewportTexture::has_alpha() const {
@@ -147,6 +149,7 @@ ViewportTexture::ViewportTexture() {
vp = NULL;
set_local_to_scene(true);
+ proxy = VS::get_singleton()->texture_create();
}
ViewportTexture::~ViewportTexture() {
@@ -154,6 +157,8 @@ ViewportTexture::~ViewportTexture() {
if (vp) {
vp->viewport_textures.erase(this);
}
+
+ VS::get_singleton()->free(proxy);
}
/////////////////////////////////////
@@ -2813,6 +2818,7 @@ Viewport::Viewport() {
default_texture.instance();
default_texture->vp = const_cast<Viewport *>(this);
viewport_textures.insert(default_texture.ptr());
+ VS::get_singleton()->texture_set_proxy(default_texture->proxy, texture_rid);
//internal_listener = SpatialSoundServer::get_singleton()->listener_create();
audio_listener = false;
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 6bbd4b26b5..0835e3f69a 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -59,6 +59,8 @@ class ViewportTexture : public Texture {
friend class Viewport;
Viewport *vp;
+ RID proxy;
+
protected:
static void _bind_methods();