I’m not sure if this is an OpenGl issue or a Windows issue.
I’m doing a instalation for a company that wants to have a peace of software running several openGl windows in fullscreen on a range of different monitors - all from one machine.
My problem is that making a window go fullscreen on windows alwais means going fullscreen on the primary screen, how do I tell opengl/windows that I want a window to go fullscreen on a particular monitor?
The glut glutFullScreen() goes to primary screen, Would I have to do an implementation for the call my self to get a call that would be able to do glFullScreen(ScreenID) ?
I don’t have experience with that, but how about creating 1 window per screen, and move each window onto a different screen?
The HDC of the window is maybe the key-point here, that tells OpenGL on which monitor to render.
Yes, create multiple windows. Move your windows to the right position and size, turn off the window borders etc(SetWindowLong).
There is no special “fullscreen” mode i am aware of, its just a window as big as the screen with no decorations.
Older drivers had the serious limitation that only the primary display was hardware accelerated.
I think this is fixed by recent drivers from nvidia/ati(current nvidia driver have a switch for single/multiple display opengl).
Another option:
If you have two displays connected to one physical card, you can create a window spanning the area of both virtual screens.
With NV hardware you can create one window and resize it over all monitors across multiple adapters and still get full hw accelertion. Creating GL context on spcific adaper is not supported by win32 api. Just configure driver control panel and adjust hw acceleration to be on mulriple display adapters.
Are you saying you want to independantly alter screen resolution on each of the monitors from the actual gl app, rather than through display settings?
If so, it’s simple using the win32 API (sorry - I have absolutely no idea about glut). Look at ChangeDisplaySettingsEx - it gives you the option to specify which monitor you want change resolution on.
If you just want to use the current display resolution simply make a window without borders or title bar and make it the same size as the monitor it’s running on.
Actually, as an afterthought, do yourself a favour, drop glut, and learn OpenGL via the win32 API (nehe.gamedev.net is a good source for beginners). I believe glut is basically a learning aid, and fairly limited with what you can do with it.