View Full Version : How can i detect that the user have installed the graphics driver?
12-21-2005, 02:43 AM
Some users don't install their graphics driver. They think that XP installs the OpenGL driver for them. Then they play my demo and see some ugly objects. Then they say that my program is invaluable!
So i should detect whether the user have installed his/her graphics card?And more important i want to know that if their graphics card support the OpenGL API? Or does it have enough memory to run my demo?
So how can i detect the graphics card features?
You can do this pretty easy:
char renderer = "";
strcpy (renderer, (const char*) glGetString (GL_VENDOR));
if (strstr (renderer, "MICROSOFT") != NULL)
throw EXCEPTION ("Your graphics-card does not support OpenGL.\nPlease update your display-driver.");If the user didn't install any drivers, the Renderer will be "Microsoft Generic" or so. Else it would contain "nVidia" or "Ati" or something else ("Intel", "XGI", ...).
Hope that helps you.
12-21-2005, 04:03 AM
There ate lots of drivers available and the user might be running an old one for specific reasons (bugs in new drivers for example), you do not know where to get the driver unless you start try to figure out what hardware is in use, any there may be hardware you do not know anything about so how would you get a driver....
The short answer, you should not mess with the users drivers.
Many drivers are downloaded when you run "Windows Update" (optional choice).
OpenGL 1.1 is going to work on any XP because there is a fallback software implementation.
What you can do is to check if the user is running the software opengl driver (glGetString) and also check if correct extensions are available and if not give the user a notification at startup.
Of course, you can be less drastic and not shut down, if the user runs in software and simply notify him, that his gaming experience might be very limited, as long as he doesn't upgrade.
If you need more advance features, through extensions, you need to check for their availability anyway.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.