Skip to content

Monitor handle missing with OpenGL #2411

@Doprez

Description

@Doprez

Release Type: Official Release

Version: 4.2.0.2188

Platform(s): Windows

Describe the bug
I was trying to get the screen bounds to be able to scale the window based on the Users screen resolution. However the monitor handle is a null pointer when the Graphics API is OpenGL. I have not tested this on Linux but this will be a useful to know since this would be a useful feature for devs.

To Reproduce
Steps to reproduce the behavior:

  1. Inherit from the Game class
  2. override BeginRun()
  3. add the following code:
protected override void BeginRun()
{
  base.BeginRun();
  var desktopBounds = GraphicsDevice.Adapter.Outputs[0].DesktopBounds;
}
  1. place breakpoint after desktop bounds and see broken resolution.

Expected behavior
This should function the same way that the DirectX graphics API does and have the monitor information.

Screenshots
image

Additional context
Im not sure if its related but you also can not resize the window while using OpenGL but that might need a separate issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions