How to create a full screen window with version 3.0.1?

markspeir wrote on Saturday, July 06, 2013:

I’ve searched, but I can find no examples or any documentation on how to create a full screen window. A full screen window isn’t simply as window with a width and height equal to the screen’s, as I can attest from calling glfwCreateWindow with my screen width and height.

There needs to be a hint to tell GLFW to set up the window as a full screen window and I can find no references to such a beast. How do I do this?

markspeir wrote on Saturday, July 06, 2013:

OK, I figured it out, but WOW!

In the transition guide, under “Changes to existing features->Multi-monitor Support” is the single, nondescript, sentence: “To request a full screen mode window, instead of passing GLFW_FULLSCREEN[,] you specify which monitor you wish the window to use.”

Um… OK then. O.o

So, this creates a full screen window:

glfwCreateWindow(width,height,“Title”,glfwGetPrimaryMonitor(),NULL);

elmindreda wrote on Sunday, July 07, 2013:

It’s described in the documentation for glfwCreateWindow as well as in the tutorial.

markspeir wrote on Sunday, July 07, 2013:

Found that just now. Thanks.

It does need to be in the glfwCreateWindow documentation as well. That was the first place I went as it seemed like the most logical place to find the information. It isn’t there.

elmindreda wrote on Sunday, July 07, 2013:

It states

monitor
The monitor to use for full screen mode, or NULL to use windowed mode.

elmindreda wrote on Sunday, July 07, 2013:

I’ll add more language to glfwCreateWindow and a window creation section to the Window handling guide.

markspeir wrote on Sunday, July 07, 2013:

I’m sorry, but that concept of creating a widow by giving it a monitor is foreign to me. I’ve never seen such a method used in any windowing system, and the concept isn’t very obvious. It is useful in a multiple monitor set up, but how this relates to create a full screen window is not clear. Moreover, what if I want to create a non-fullscreen window on a second monitor?

elmindreda wrote on Sunday, July 07, 2013:

The monitor parameter is only for which monitor to go full screen on.

The monitor functions allow you to figure out where on the virtual screen the different monitors are located. If you want to position your windowed mode window on a specific monitor, just set its position.

markspeir wrote on Sunday, July 07, 2013:

Thanks for the information. I’m not trying to be critical. It is just that the method is counter-intuitive. Without it be clearly and plainly described, I had no hope of figuring it out. It simply did not make sense, based on my experience programming on widow-based GUIs.