How can I enumerate all display adapters in a user’s system, and then choose wich one will be active?
Under Windows: EnumDisplayDevices. Note that, if you have multiple adapters under Windows, only the primary adapter can use hardware-accelerated OpenGL. All other adapters will have to use the MS OpenGL 1.1 software renderer.
I don’t known how to enumerate number of adapters but all nvidia card support “advanced multimonitor support” and if you enable it so than you will have all screens accelerated… )
OK, but the problem is, if someone has 2 graphic cards. Then he must be able to somehow choose which one will be primary OpenGL renderer, right?
I don’t think it’s possible to have two or more drivers installed at the same time. A limitation in the ICD mechanism. So no, you can’t choose primary adapter just like that.
If it’s impossible then why DirectX has something like Direct3D.GetAdapterCount()?
[This message has been edited by trooper (edited 11-04-2002).]
Because DirectX is DirectX and has built-in support for multiple adapters and a different driver architecture to accommodate for this. The ICD mechanism on Windows for OpenGL only supports one ICD in the system. Therefore only one adapter can get hardware-acceleration.
Note that multi-head adapters usually work fine though. It’s funny actually. If, on my dual-head GF4, I move an OpenGL window to my other monitor, it’s still hardware-accelerated. If I do the same with a DirectX window, it falls back to the software rasterizer
Hey people about you talking?
Only nvidia cards have the “advanced multimonitor support AMS”. You don’t need to set up witch card is primary (it just tell window virtual position of screen) just enable AMS that is everything. Than you can enumerate cards through the DirectX… The AMS has only one disadvantage you cannot move window across screens… And one more disadvantage the nvidia support only four cards in the system…