Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Viewport size change not updating textures #64735

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Aug 22, 2022

Fixes this bug:
iNXynJNBNW
Test script (3.x):

func _ready() -> void:
	yield(get_tree().create_timer(1), "timeout")
	$Viewport.size *= 2
	yield(get_tree().create_timer(1), "timeout")
	$PanelContainer/Sprite.update()

After fix:
IwIxfvvSxk

Originally discovered in 3.x, but the bug also exists on master.

Here's code for 3.x branch:

for (Set<ViewportTexture *>::Element *E = viewport_textures.front(); E; E = E->next()) {
	E->get()->emit_changed();
}

@KoBeWi KoBeWi added bug topic:rendering cherrypick:3.x Considered for cherry-picking into a future 3.x release labels Aug 22, 2022
@KoBeWi KoBeWi added this to the 4.0 milestone Aug 22, 2022
@KoBeWi KoBeWi requested a review from a team as a code owner August 22, 2022 14:41
@akien-mga akien-mga merged commit 6ccbc27 into godotengine:master Sep 2, 2022
@akien-mga
Copy link
Member

Thanks!

@KoBeWi KoBeWi deleted the viewportshifter branch September 2, 2022 13:44
@akien-mga
Copy link
Member

Cherry-picked for 3.6.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants