Browse Source

Add NVidia to list of detected drivers.

I hoped this commit will never need to happen.
pull/132/head
Vladimír Vondruš 10 years ago
parent
commit
9715e0c4b8
  1. 7
      src/Magnum/Context.h
  2. 5
      src/Magnum/Implementation/driverSpecific.cpp

7
src/Magnum/Context.h

@ -209,6 +209,11 @@ class MAGNUM_EXPORT Context {
IntelWindows = 1 << 1,
#endif
#ifndef MAGNUM_TARGET_WEBGL
/** Binary NVidia drivers */
NVidia = 1 << 2,
#endif
#ifdef MAGNUM_TARGET_GLES
/**
* OpenGL ES implementation by ANGLE (translated to D3D), used by
@ -216,7 +221,7 @@ class MAGNUM_EXPORT Context {
* specification explicitly disallows exposing driver information
* to the application, this check cannot be done reliably.
*/
ProbablyAngle = 1 << 2
ProbablyAngle = 1 << 3
#endif
};

5
src/Magnum/Implementation/driverSpecific.cpp

@ -113,6 +113,11 @@ auto Context::detectedDriver() -> DetectedDrivers {
#endif
#endif
#ifndef MAGNUM_TARGET_WEBGL
if(vendor.find("NVIDIA Corporation") != std::string::npos)
return *_detectedDrivers |= DetectedDriver::NVidia;
#endif
/** @todo there is also D3D9/D3D11 distinction on webglreport.com, is it useful? */
#ifdef MAGNUM_TARGET_GLES
/* OpenGL ES implementation using ANGLE. Taken from these sources:

Loading…
Cancel
Save