diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-11 10:44:24 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-11-11 10:44:24 +0100 |
commit | bbe8ff24f4f873806701ef8d924bac2b7097203b (patch) | |
tree | 0761453bfea2c72e6784cf98ef287b2a9fa0bf2e | |
parent | 3263970cf6f2a8f442cab8a581908f0546c6ddfe (diff) | |
parent | 7445ab95fc0aa8e1129649c3303ad192fae2fc30 (diff) |
Merge pull request #68358 from Sauermann/fix-pink-512-viewport
Fix SubViewport with default size being pink
-rw-r--r-- | scene/main/viewport.cpp | 4 |
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() {} |