GL viewports & displays

Does GL offer any way to choose on which display a viewport is to be shown, or is this functionality OS dependent? Here, I mean some game consoles, which offer multiple displays and also the usual desktop GPU with multiple monitors attached. What APIs are available for this? I am completely clueless, for example, how I might do this on X, as well as Windows.

In the case of X11 I think it’s depending on what display the context is bound to by glXMakeCurrent(). The display (i.e. the X connection) is dependent on the hostname:server.screen (:0.1 for instance meaning localhost:display0.screen1). So I assume that if you have a context which is bound to a drawable which is in turn managed by the connection, which is referring to a specific screen, you might be able to bind a context to specific screen.

This might give you some clue about X11 programming.

However, if you simply take some available library which does the context and window creation stuff for you, you could simply create two windows with to GL contexts and have the toolkit do the screen assignment.

Edit: Also found these slides by NVIDIA.