i’m currently working for a client to get a multi-monitor application up and running on a system with 2 ATI FirePro V8800 cards. To each card four monitors are connected. The layout of the monitors is two rows, with 4 monitors each, the bottom row being connected to the primary display adapter.
The application does the following in terms of wgl and ogl:
- create a rendering context on application start up. this rendering context is used for all rendering throughout the application.
- the application allows the user to create new windows displaying specific information. Each active window is added to a list of targets to be rendered to. The pixel format of the client area control OpenGL should render to is set to support HW-accelerated OpenGL rendering.
- in the rendering thread (which is actually the UI message dispatch thread, where we listen for idle events) the renderer runs through the list of target windows.
- for each window its device context (or rather the DC of a control contained in the window) is fetched (GetDC), the rendering context is made current with this device context, the scene for that window is rendered, wglSwapBuffers is invoked followed by a call to wglMakeCurrent(null, null) and (ReleaseDC).
This works perfectly fine as long as windows are only created on monitors of the primary display adapter (bottom row in the setup described above). As soon as windows are created on a display of the secondary adapter wglMakeCurrent fails, with GetLastError returning zero.
The code is written in C#, using the Tao Framework, the device context setup is done via the standard GDI ChoosePixelFormat and SetPixelFormat functions. The pixel formats for all the windows are the same, so i can rule out that this is the issue (i double check the return value of ChoosePixelFormat for all subsequent windows after creating the first window and settings its pixel format).
The behaviour is not reproduceable on NVIDIA cards, which leads me to the believe that this might be a driver issue. However, i wanted to pass this way of rendering by this forum first before i draw any conclusions. Do you see any glaring errors in the above description?