   OpenGL + multimon + Windows
  Hello, everybody. I have a quick question about programming OpenGL on Windows. I have multiple monitors, and I'd like to have a full-screen, hardware-accelerated application running on the secondary monitor.Using DirectX, I can do this by calling IDirect3D9::CreateDevice(1,...).To start up OpenGL, I use the wgl* functions. So does anyone know if it's possible to open a full-screen window (i.e., no border) on the secondary monitor?Thanks a lotMarkP.S. I apologize if this is obvious, or has been answered before. I've looked around, and couldn't find anything.   
  yes, it is, you have to specify the correct device context however for the monitor.Beyond that, as long as the drivers support it it should work as normal.   ;  Thanks for your reply, Phantom. Do I do something likehdc = CreateDC(lpszDisplayName, NULL, NULL, lpDevMode);specifying the name of the secondary monitor in the first argument? But then how do I handle the Windows message loop (I usually create a full-screen window that handles the messages)? If you or anyone else has any sample code, I'd really appreciate it.Mark   ;  Well, MSDN would be your best bet for details on how todo it.The message loop will be the same as it would be for a window running on a single monitor system an extra monitor doesn't make a difference.   ;  On most Windows XP systems (now, as of June 2006), only the primary display can be used for hardware accelerated OpenGL rendering.In my test system (Win XP/SP2), there is an NVidia GeForce 6600 PCIE and an ATI Radeon 9250 PCI. First I select the Geforce as primary and the Radeon as secondary. It will render via HW-accel to the Geforce only but not to the Radeon. Then I select Radeon as primary in the "display properties" (no restart). When I try to render to the GeForce again, it fails to load OpenGL extensions (not only shaders, but also multitexturing and vertex buffers). The same thing happens with the Radeon: HW-acceleration only works when it's the primary. So after changing a checkbox in "display properties", all 3d accel capabilities of that card become inaccessible. This seems to be a design flaw of the Microsoft OpenGL implementation.Here is a FAQ on this topic. It indicates that (some) 3DLabs cards can do hw-accelerated OpenGL rendering as secondary display. It also states that if all cards in the system are NVidia, all can be hw-accelerated. I'll soon set up a 6200/6600 test system to verify that.EnumDisplayDevices(0, DeviceIndex, &dev, 0) returns device names like "\\.\DISPLAY1" and EnumDisplayDevices(dev.DeviceName, MonitorIndex, &monitor, 0) returns monitor names like "\\.\DISPLAY1\Monitor0". The device name has to be used with CreateDC, MONITORINFOEX and EnumDisplaySettings, even if it is not enough to identify the monitor when multiple monitors are attached to one device.CreateWindow and GetDC works with OpenGL, but these are unsuitable for monitors that are not attached to the desktop. Also, I have to use the extremely complicated EnumDisplayMonitors and GetMonitorInfo to figure out the right window coordinates to cover a specific monitor.CreateDC returns a device context for fullscreen rendering with GDI, but not for OpenGL. The DC returned by CreateDC is not appropriate for wglCreateContext (as also stated here and here).To sum it up, these things don't seem to work:- OpenGL HW-acceleration on non-primary display- Select a specific monitor when more monitors are attached to the same device- OpenGL on any monitor that is not attached to the desktopHope you know something that might solve any of these issues.[Edited by - Goodrush on June 5, 2006 5:30:54 PM]