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

Monitor handle missing with OpenGL #2411

Open
Doprez opened this issue Aug 14, 2024 · 0 comments
Open

Monitor handle missing with OpenGL #2411

Doprez opened this issue Aug 14, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Doprez
Copy link
Contributor

Doprez commented Aug 14, 2024

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.

@Doprez Doprez added the bug Something isn't working label Aug 14, 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
Projects
None yet
Development

No branches or pull requests

1 participant