pixel
pixel copied to clipboard
Access underlying glfw window
I am trying to do some GUI stuff using pixel and I would like to access the underlying glfw window from a pixelgl.Window object. As far as I know there is no way of doing this, am I correct?
What I am trying to do is to access the monitor to compute the DPI. Unfortunately the Monitor functions in pixelgl work only in fullscreen mode. Wouldn't it make sense to provide these functions also for normal windows? I think that with glfw it would be possible.
But I also believe that the underlying glfw objects must somehow be accessible and not unexported, because some advanced users might need them.
Hm, that's interesting, I wasn't even aware those functions didn't work when not in fullscreen.
I'm currently working on other things, so I can try and fix it later, but if you're feeling brave, you're more than welcome to jump in and make it work with a PR :).
Regarding exporting the underlying GLFW objects. Pixel aims to be a simple library, and something like exposing the underlying implementation kinda goes against that. I believe if we support everything that's usually needed, there's no need to exposing the GLFW objects anyway.
I'd say either exposing the inner GLFW window handle or allowing the user to pass a custom handle would be amazing, allowing for many more ways of using this together with other libraries such as imgui-go.