Choosing OpenGL device

Hello, I have two ATI cards that both appear to use the same opengl driver (atio2kaa.dll) However I need it to use the second device it finds and not the first one when requesting an OpenGL rendering context. How can I force it to use a specific device?

Did you try to copy the DLL itself to the source path of your program.

umm, both cards use the SAME dll.

I think Windows doesn’t support device enumeration for OpenGL-devices.

Well. At first I didn’t understand. Well, I don’t know exactly how to solve this problem but maybe the key to this is that OpenGL doesn’t know through which device it’s rendering. It only cares on which “device context” it renders its frame buffer. So you have to find a way to force a device context to deal with one device.

Please,

When you have Windows-specific OpenGL questions,
surf on over to msdn.microsoft.com and have
a look for yourself. They have a good search
engine, their documentation is mostly up to
date, and it beats having to wait for this
board to give (hopefully correct) answers.

In this case, have a look at the “hDC”
argument to wglCreateContext(); it seems to
be what you’re looking for.