I was wondering how to get a windowed window on my second screen. I cannot fill-in the second monitor as parameter for glfwCreateWindow because this results in a full-screen window.
How I solved it now (after looking through the internet) is just placing the window on the second screen (by using glfwSetWindowPos with coordinates bigger than the first screen). Is this the appropriate way to do this, or is there another, better way I haven’t found on google?
Furthermore, if I use 2 (equal) GPUs, one per screen, does this method ensure that one GPU draws one window and the other GPU draws the other window?
The reason I’m asking, is because when I implemented all of this my program is less stable than my program that only uses 1 screen, 1 GPU and creates only 1 window. With less stable I mean more deviations from the refresh rate and some flickering.
I implemented the 2 windows as follows: the main thread creates 2 windows and sets up GLFW. Then I create a thread. Then both the main and the thread go in the usual drawing loop (as long as window is open, keep rendering, drawing and swap buffering).This way I’m getting the refresh rate as FPS (whereas with only 1 thread I got refresh rate/2 as FPS), but as I said before, it’s less stable and deviates more often.
I hope somebody is kind enough to answer my questions. I really did Google quite a bit and went through many StackOverflow posts, but I couldn’t find satisfying answers. Moreover, I hope my question is clear and the given information is sufficient. Thank you all in advance:)!