Probe the GL_RENDERER string on Nvidia to grab the driver version.

This commit is contained in:
Ryan Houdek 2014-01-07 18:29:04 -06:00
parent 7acc64eb0a
commit d2e62796fc
1 changed files with 11 additions and 0 deletions

View File

@ -334,6 +334,17 @@ void InitDriverInfo()
version = 10000*major + 1000*minor + release;
*/
break;
case DriverDetails::VENDOR_NVIDIA:
{
int glmajor = 0;
int glminor = 0;
int glrelease = 0;
int major = 0;
int minor = 0;
sscanf(g_ogl_config.gl_renderer, "%d.%d.%d NVIDIA %d.%d", &glmajor, &glminor, &glrelease, &major, &minor);
version = 100*major + minor;
}
break;
// We don't care about these
default:
break;