Is it possible to use a Device Context for a Display Adapter (not a particular window’s DC) with OpenGL? The primary reason I am trying to do this is that I want to render OpenGL on multiple monitors, but the monitors are not necessarily members of the Windows desktop monitor group (and thus cannot have windows on them). Here’s some of my test code. Everything seems to work until I call wglMakeCurrent().
dc = CreateDC( _T("\\.\DISPLAY2"), NULL, NULL, NULL );
pixelFormat = ChoosePixelFormat (dc, &pfd);
SetPixelFormat (dc, pixelFormat, &pfd);
rc = wglCreateContext (dc);
wglMakeCurrent (dc, rc);
wglMakeCurrent() returns false, and a call to GetLastError() returns 3221684230, which I haven’t been able to decipher – there is no documentation on errors returned by wglMakeCurrent(), and using FormatMessage() does not reveal anything about this error code. It’s weird… it’s almost as if MS would rather I didn’t use OpenGL ;-).
Thanks in advance.