Multiple windows on multiple monitors

dteinferno wrote on Friday, July 04, 2014:

I’ve been building a setup with three projectors illuminating a cylindrical screen. To that end, I’m trying to create a scene with three different windows that each are full screen on one of the projectors. I was able to follow an online tutorial (http://blog.gvnott.com/2013/05/18/tutorial-multiple-windows-with-glfw3-and-glew-mx/) to create multiple windows with different contexts. However, when I try to make the windows run full screen on the projectors by adding

int count;
GLFWmonitor** monitors = glfwGetMonitors(&count);

and then changing the first nullptr in CreateWindow(c_iDefaultScreenWidth, c_iDefaultScreenHeight, “First”, nullptr, nullptr) to monitors[1] in the first case and monitors[2] in the second, I only see the image on the second window while the first window is black. Any ideas what I’m doing wrong? Thanks!

gvnott wrote on Monday, July 14, 2014:

C/C++ arrays are zero based, try using monitors[0] and monitors[1] instead.

Also there are some bugs in GLFWs handling of full screen windows, e.g:
https://github.com/glfw/glfw/issues/143

You might want to download and build GLFW from the latest source to get these fixes.

is there any sample code? i need this too, but the blog closed

I have now corrected the links in this post with the example of how to create multiple windows: