View Full Version : GL viewports & displays
07-18-2012, 01:58 AM
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.
07-18-2012, 04:13 AM
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 (http://tronche.com/gui/x/xlib/) 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 (http://developer.download.nvidia.com/GTC/PDF/GTC2012/PresentationPDF/S0353-GTC2012-Multi-GPU-Rendering.pdf) by NVIDIA.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.