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
DesktopGL: GraphicsDevice.ScissorRectangle is set only once and isn't updated if the window gets resized #8084
Closed
2 tasks done
Comments
When the viewport gets resized, doesn't it update both |
Well, check the sample. It's quite simple and the image shouldn't be cut on resize. But it is cut. |
Hello, as this issue seems to still be present, is it open for me to take a look at? I'd like to work on it. |
samercer2002
added a commit
to samercer2002/MonoGame
that referenced
this issue
Apr 18, 2024
The fix to this problem was testing to see if the ScissorRectangle was enabled and resizing it whenever the viewport was resized. This was not done by default for DesktopGL as far as I could tell.
mrhelmut
pushed a commit
that referenced
this issue
May 18, 2024
* Fixed ScissorRectangle Bug Noted in Issue #8084 The fix to this problem was testing to see if the ScissorRectangle was enabled and resizing it whenever the viewport was resized. This was not done by default for DesktopGL as far as I could tell. * Resolving comments from PR. Resolving Simon's comment with regards to the placement of the conditional.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Prerequisites
develop
branchMonoGame Version
MonoGame 3.8.1.303
Which MonoGame platform are you using?
MonoGame Cross-Platform Desktop Application (mgdesktopgl)
Operating System
Windows
Description
GraphicsDevice.ScissorRectangle is set to wrong value if GraphicsDevice.Clear is called.
Initially ScissorRectangle is set to the window size on the initialization:
MonoGame/MonoGame.Framework/Graphics/GraphicsDevice.cs
Line 385 in a91dcc7
And seems that it never gets updated.
Steps to Reproduce
Minimal Example Repo
No response
Expected Behavior
GraphicsRectangle should be synchronized with the ViewPort. That's how it works for MonoGame.WindowsDX.
Resulting Behavior
scissorBug.mp4
Files
MGScissorResize.zip
The text was updated successfully, but these errors were encountered: