Multiple windows on multiple monitors

Using GLFW
  • Dan

    Dan - 2014-07-04

    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 ( 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!

  • Greg Nott

    Greg Nott - 2014-07-14

    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:

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


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks