Skip to content

DesktopGL: GraphicsDevice.ScissorRectangle is set only once and isn't updated if the window gets resized #8084

Closed
@rds1983

Description

@rds1983

Prerequisites

  • I have verified this issue is not present in the develop branch
  • I have searched open and closed issues to ensure it has not already been reported.

MonoGame 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:

ScissorRectangle = _viewport.Bounds;

And seems that it never gets updated.

Steps to Reproduce

  1. Unpack the attached sample, open in the IDE and run.
  2. Resize the window.
  3. Notice that the image gets cut. That happens because of the wrong Graphics.ScissorRectangle.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions