PDA

View Full Version : Assign opengl program to secondary GPU



Dylan
04-11-2008, 12:46 AM
Hello.

I have a pc setup with 2 nvidia quadro nvs440 and 8 monitors attached.

I need to render 8 different(relatively small) opengl applications, one at each display.

I noticed that I could run 4 opengl applications very smoothly, but as soon as I start a 5th one, the system gets very slow. I think this due to the fact that I try to render all 8 applications by the same videocard. If I am able to devide the 8 applications evenly over the two graphics card I should run all 8 applications smoothly.

I have seen that there exists an extension called WGL_NV_gpu_affinity, that should give me the possibility to do so. I find it very hard to understand how to use it, I only have experience in creating opengl/GLUT applications.

Can someone give me some code for creating very simple opengl(glut) application that runs on the secondary GPU(my other quadro card)?

I would be very grateful,

Dylan

dimensionX
04-11-2008, 08:13 AM
WGL_NV_gpu_affinity is only supported on Quadro professional series graphics cards. I don't think NVS series falls in the above category.

Try this:-
----------
1) Create a glut window on each monitor (this will gaurentee that a particular window is mapped to the GPU that is connected to the monitor you have created the window on). Hint:- glutWindowPos() etc...
2) Query their device and rendering context
3) Make the device and rendering context current for each window and starting rendering

Groovounet
04-11-2008, 09:21 AM
The idea is to create a different OpenGL context that use the secondary video card. This is done through Win32 API, I guest with the "Pixel Format". I think that GLUT doesn't provide such mechanism sorry...