Enumerating devices

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

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…

wow, that’s pretty amazing

guess I won’t be using openGL anymore

Nonesense … You just need to switch to a new Display Adapter/Monitor setting - see EnumDisplayDevices and EnumDisplaySettings … it really isn’t that hard!

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…

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…