View Full Version : Fullscreen, Displays, Virtual Screens

07-08-2008, 06:50 PM

I'm trying to render (fullscreen, CGL) to two displays from a single GPU, as in Figure 1.7. (http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_pg_concepts/chapter_2_section_4.html)

When I capture all displays and go fullscreen, only the main display is rendered to. I believe the problem is that the pixel format attribute corresponding to kCGLPFADisplayMask is CGDisplayIDToOpenGLDisplayMask( kCGDirectMainDisplay ), which ignores other displays.

I was hoping that since I want one virtual screen, I could use a single context to render it to both physical displays.

Do I have to create a separate context for each physical display? If not, could someone point me in the right direction?


07-08-2008, 08:01 PM
I believe you need two full-screen contexts, one for each display, or one windowed context (which might nevertheless cover the full screen) crossing both.

07-08-2008, 08:49 PM
Thanks! I could've spent a long time trying to make this work.

As a quick note to anyone who might stumble across this later trying to do the same thing, I did try to create a display mask based on all of the active displays (http://developer.apple.com/qa/qa2007/qa1542.html), but it still rendered to a single display once it went fullscreen.