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 incorrect clipping due to stale viewport dimensions #680

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

s1sw
Copy link
Contributor

@s1sw s1sw commented Oct 3, 2024

Previously, RenderManager's viewport dimensions were only updated when creating or resizing a context, causing incorrect clipping when using multiple differently sized contexts:
image

This PR updates them from Context::Render, fixing the issue.

@mikke89
Copy link
Owner

mikke89 commented Oct 3, 2024

Nice find, thanks a lot!

It makes a lot of sense to do this, considering that the render manager is a wrapper around the render interface, which can be shared between multiple contexts.

I think it would be a bit clearer to make this part of the PrepareRender function. Otherwise I'm happy with this.

@mikke89 mikke89 merged commit 1b6411f into mikke89:master Oct 3, 2024
32 checks passed
@mikke89
Copy link
Owner

mikke89 commented Oct 3, 2024

Perfect, thanks again!

@mikke89 mikke89 added bug Something isn't working rendering labels Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working rendering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants