diff --git a/src/Magnum/Context.h b/src/Magnum/Context.h index ee03f8c4f..b2f4eaff4 100644 --- a/src/Magnum/Context.h +++ b/src/Magnum/Context.h @@ -223,6 +223,9 @@ class MAGNUM_EXPORT Context { NVidia = 1 << 2, #endif + /** Mesa drivers on Linux */ + Mesa = 1 << 3, + #ifdef MAGNUM_TARGET_GLES /** * OpenGL ES implementation by ANGLE (translated to D3D), used by @@ -230,7 +233,7 @@ class MAGNUM_EXPORT Context { * specification explicitly disallows exposing driver information * to the application, this check cannot be done reliably. */ - ProbablyAngle = 1 << 3 + ProbablyAngle = 1 << 4 #endif }; diff --git a/src/Magnum/Implementation/driverSpecific.cpp b/src/Magnum/Implementation/driverSpecific.cpp index 2eee3a437..860039e02 100644 --- a/src/Magnum/Implementation/driverSpecific.cpp +++ b/src/Magnum/Implementation/driverSpecific.cpp @@ -127,6 +127,7 @@ auto Context::detectedDriver() -> DetectedDrivers { _detectedDrivers = DetectedDrivers{}; const std::string vendor = vendorString(); + const std::string version = versionString(); /* Apple has its own drivers */ #ifndef CORRADE_TARGET_APPLE @@ -140,6 +141,12 @@ auto Context::detectedDriver() -> DetectedDrivers { if(vendor.find("Intel") != std::string::npos) return *_detectedDrivers |= DetectedDriver::IntelWindows; #endif + + #ifdef CORRADE_TARGET_UNIX + /* Mesa drivers */ + if(version.find("Mesa") != std::string::npos) + return *_detectedDrivers |= DetectedDriver::Mesa; + #endif #endif #ifndef MAGNUM_TARGET_WEBGL