Fix SubViewport with default size being pink
A SubViewport with default-size doesn't display its content, but shows pink color, until it is resized. This patch makes sure, that the size gets set during initialization.
This commit is contained in:
parent
bb5b45e950
commit
7445ab95fc
|
@ -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() {}
|
||||
|
|
Loading…
Reference in New Issue