View Full Version : drawing on different video boards

02-03-2010, 01:59 AM

I have written an app that creates 4 windows (under windows XP sp3) to plot different views, each with its own dc and rendering context, and I want to plot my views on 4 different screens. in my test machine, I have 2 video cards (main is nVidia 9600GT) and a secondary PCI ATI radeo 5200. Each board is connected to two screens. The problem is, everything works perfect if the windows are on the screens of the main video board but only an empty window (no openGL drawing) on the screens of the second board.
I have set the first screen of the main board as main screen, and extended the desktop to the other screens.
Is there specific programming to do to use more than one board ?


Stephen A
02-03-2010, 02:14 AM
This is a typical issue: you cannot get accelerated rendering when using multiple boards on XP. Only the first board will support OpenGL/D3D. That said, it might be possible to get the second board to display OpenGL using the software renderer, but this is limited to OpenGL 1.1 (check glGetString(GL_VENDOR) to see which renderer you are getting).

Of course, the best solution is to use a card that supports 4 monitors at the same time - Ati's recent 5xx0 series can do up to 6 monitors and there are several workstation-class cards that support 4 monitors (FirePro and Quadro).

02-03-2010, 05:03 AM
Or just replace the ATI by an Nvidia card, and setup the desktop in 'span' mode.

02-05-2010, 10:01 AM
Thanks for the quick reply,

I have made several mistakes on identifying my video boards:
main is a nVidia 7600GS (PCIe) and secondary is also nVidia FX 5200 (PCI) not an ATI one.

I configured the nVidia panel to span the cards, the screens have different sizes (2 x 1280x1024 on 1st board) and 2 x (1024x768) on 2nd board. After checking "span" in nVidia panel, windows report two large screens 2560x1024 and 2048x768, aligned horizontally with x coordinate running through both.

On the screens on board 2, the windows are created with a default white background (windows), but no openGL instruction is effective, not even glClear to set the background to black (background just stay white).

Any idea ?

Stephen A
02-05-2010, 03:13 PM
Take a look into WGL_nv_gpu_affinity (http://developer.download.nvidia.com/opengl/specs/WGL_nv_gpu_affinity.txt).

02-05-2010, 05:48 PM
This is different GPU generation.. I think its not gonna work. But you can try...

Check driver control panel settings.. Play with "Multi Display/Mixed GPU acceleration" option (Single, Multi-perofrmance and Multi-compatibility).
Long time ago I have setup with 3x NV8500 with 6 monitors. I set dual view mode (not span and not clone) for each card, and enable Multi Display Compatibility or Performance mode (dont remember now) and I can create huge OpenGL window across all 6 monitors with hw acceleration.

02-06-2010, 09:18 AM

Thanks for the help. in my Nvidia panel, there's no access to "Multi Display/Mixed GPU acceleration" option, although I have seen it on another machine with a different video board. I have reinstalled the latest drivers for 7600GS and FX5200, same.

I have a visual C++ 2008 project with c++ code, and I would like to try the "GPU affinity" programming solution, however when I follow the nVidia Presentation, the function "wglEnumGpusNV" is not recognized, what headers/libraries do I need there ?


02-07-2010, 04:51 AM
OK, I found it. I installed the "glew" extension with headers, libs and the glew32.dll.
There's a small utility with the glew package that lists the supported extensions. the utility is named "glewinfo.Exe". In my case, it reports :

WGL_NV_gpu_affinity: MISSING
wglCreateAffinityDCNV: MISSING
wglEnumGpuDevicesNV: MISSING
wglEnumGpusFromAffinityDCNV: MISSING
wglEnumGpusNV: MISSING

I also ran it on another machine with a NVidia 9500 GT card, same result.

I'm now hopeless and desperate on how to solve my problem.
By the way, I have read somewhere that usually, all OpenGL commands should be sent to all boards, and that the affinity extensions are more to solve performance issues. In that case, why my second board just draw empty windows without any OpenGL objects in it ???

02-07-2010, 05:49 AM
NV_gpu_affinity is only supported on Quadro-class cards, not on consumer cards (GeForce).

In order to get full OpenGL 'automatic' (withouth GPU affinity) acceleration across multiple graphics cards on Windows, they all must be identical, or at least of the same chip generation. This is because the driver MUST expect the window to be moved across monitors of different GPUs at any point in time. This also means, it has to clone every state change and every resource (textures/shaders/VBOs etc) to all GPUs, which can be very slow if you do things like render-to-texture and the like.

On ATI the story is a bit different, though. There's AMD_gpu_association. It is present on professional AND consumer level cards! The extension is designed to cope with GPUs that are not identical (different chip, different amount of VRAM). Personally, I have used it with a pair of two ATI cards (a V8750 and a V5700 together) and it worked :-)

I'm a bit in doubt about WGL extensions, though. There are no means to ask about the WGL extensions of a specific GPU. So the best you can get is the WGL extensions of the primary GPU in the system... but this doesn't tell you anything about the WGL extensions of the other GPUs.

With AMD_gpu_association, this seems to be no problem, because an "associated context" (as they call it) has no relation to the window system, anyway.

With NV_gpu_affinity you can use the "affinity DC" for wglGetExtensionStringARB() and thereby might get a GPU specific WGL extension string. I could not test this yet, because I only have tried a setup with two equal Quadro cards.