From 5b3b7220412108bfcfd5ab73e90f292d0815337b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Sat, 4 Oct 2014 17:55:04 +0200 Subject: [PATCH] Detection of Intel Windows drivers. --- src/Magnum/Context.h | 5 ++++- src/Magnum/Implementation/detectedDriver.cpp | 11 +++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Magnum/Context.h b/src/Magnum/Context.h index 434bdf7f4..303118b6b 100644 --- a/src/Magnum/Context.h +++ b/src/Magnum/Context.h @@ -182,6 +182,9 @@ class MAGNUM_EXPORT Context { #ifndef MAGNUM_TARGET_GLES /** Binary AMD desktop drivers on Windows and Linux */ AMD = 1 << 0, + + /** Intel desktop drivers on Windows */ + IntelWindows = 1 << 1, #endif #ifdef MAGNUM_TARGET_GLES2 @@ -191,7 +194,7 @@ class MAGNUM_EXPORT Context { * specification explicitly disallows exposing driver information * to the application, this check cannot be done reliably. */ - ProbablyAngle = 1 << 1 + ProbablyAngle = 1 << 2 #endif }; diff --git a/src/Magnum/Implementation/detectedDriver.cpp b/src/Magnum/Implementation/detectedDriver.cpp index ca52c6620..758a44b0c 100644 --- a/src/Magnum/Implementation/detectedDriver.cpp +++ b/src/Magnum/Implementation/detectedDriver.cpp @@ -33,16 +33,23 @@ auto Context::detectedDriver() -> DetectedDrivers { _detectedDrivers = DetectedDrivers{}; - /* AMD binary desktop drivers */ #ifndef MAGNUM_TARGET_GLES const std::string vendor = vendorString(); + + /* AMD binary desktop drivers */ if(vendor.find("ATI Technologies Inc.") != std::string::npos) return *_detectedDrivers |= DetectedDriver::AMD; + + #ifdef CORRADE_TARGET_WINDOWS + /* Intel Windows drivers */ + if(vendor.find("Intel") != std::string::npos) + return *_detectedDrivers |= DetectedDriver::IntelWindows; + #endif #endif + #ifdef MAGNUM_TARGET_GLES2 /* OpenGL ES 2.0 implementation using ANGLE. Taken from http://stackoverflow.com/a/20149090 */ - #ifdef MAGNUM_TARGET_GLES2 { Range1Di range; glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, range.data());