PDA

View Full Version : Enumerating devices



crrouse
11-13-2001, 05:56 PM
Since I installed a second display adapter in my computer, my GL programs can no longer create a redering context.

Are there any samples, or tutorials out there dealing with this issue?

Any help is appreciated

pATChes11
11-14-2001, 10:35 AM
I think that you have to look at the registry and load the OpenGL function calls by pointer... very tedious. It'd be easier to remove the second adapter and work your ass off enough to get a dualhead card...

crrouse
11-14-2001, 04:26 PM
wow, that's pretty amazing


guess I won't be using openGL anymore

Shag
11-14-2001, 04:34 PM
Nonesense ... You just need to switch to a new Display Adapter/Monitor setting - see EnumDisplayDevices and EnumDisplaySettings ... it really isn't that hard!

McZ
11-17-2001, 08:15 AM
EnumDisplayDevices and EnumDisplaySettings <- this is only for Win NT 5.0 (win 2k) doesnīt work under win 98.. I have tried to use it but I couldnīt becous I run win 98..

Shag
11-18-2001, 03:03 PM
Try this (is problematic under W2K too)

typedef bool (APIENTRY * PFNENUMDISPLAYDEVICES) (PVOID Unused, DWORD iDevNum, PDISPLAY_DEVICEA lpDisplayDevice, DWORD dwFlags);
PFNENUMDISPLAYDEVICES EnumDisplayDevices;
HINSTANCE hInstUser32;
hInstUser32 = LoadLibrary("User32.DLL");

if (!hInstUser32)
{
return 0;
}

EnumDisplayDevices = (PFNENUMDISPLAYDEVICES) GetProcAddress(hInstUser32,"EnumDisplayDevicesA");
if (!EnumDisplayDevices)
{
FreeLibrary(hInstUser32);
return 0;
}

Then call Enum...