Skip to content
Posts
Like many, I am sure, I dove right in and created a window in pixel as my first interaction with the GoLang package. After creating a window I wanted to find out how I could resize the window or make the window fullscreen. So I have decided to explore the pixelgl monitor.go file. I want to find what properties and values I can get when detecting my monitor or monitors.
In the last snippet we saw the different fields of data we could obtain from the pixelgl Monitor struct. Now lets expand on the Create-a-Window tutorial from pixel and make use of the fields we do not see used.
We know that we can retreive information on multiple monitors, I am only going to be using a single primary monitor for these snippets.
primary monitor: -name: eDP -bitDepth: 8-bit red, 8-bit green, 8-bit blue -physicalSize: 509 mm, 286 mm -position: 0, 0 upper-left corner -refreshRate: 59 Hz -size: 1920 px, 1080 px -video mode 0: -width: 640 px, height: 480 px, refresh rate:59 Hz -.