summaryrefslogtreecommitdiff
path: root/scene/main/viewport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index f8b0a66a71..f4e55c0de3 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -4231,6 +4231,8 @@ void SubViewport::_bind_methods() {
BIND_ENUM_CONSTANT(UPDATE_ALWAYS);
}
-SubViewport::SubViewport() {}
+SubViewport::SubViewport() {
+ RS::get_singleton()->viewport_set_size(get_viewport_rid(), get_size().width, get_size().height);
+}
SubViewport::~SubViewport() {}