EngoEngine / engo

Engo is an open-source 2D game engine written in Go.
https://engoengine.github.io
MIT License
1.74k stars 136 forks source link

Determine the screen resolution of an application #745

Closed tetrahedronix closed 3 years ago

tetrahedronix commented 3 years ago

Hello, I'm sorry for this silly question but I'd like to know if I should determine the screen resolution of the desktop (for example running in Xorg) before to call engo.Run function and then set RunOptions appropriately instead of using fixed constants Width and Height when the game is to be run in window mode or is this procedure a bad coding practice to avoid?

Noofbiz commented 3 years ago

Hello! If you need the information about the monitor before calling engo.Run you can get it through GLFW. Here's the glfw monitor guide. You'd use the width and height of the monitor's VideoMode.

tetrahedronix commented 3 years ago

OK thank you very much!