Browse Source

Detection of Intel Windows drivers.

pull/77/head
Vladimír Vondruš 12 years ago
parent
commit
5b3b722041
  1. 5
      src/Magnum/Context.h
  2. 11
      src/Magnum/Implementation/detectedDriver.cpp

5
src/Magnum/Context.h

@ -182,6 +182,9 @@ class MAGNUM_EXPORT Context {
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
/** Binary AMD desktop drivers on Windows and Linux */ /** Binary AMD desktop drivers on Windows and Linux */
AMD = 1 << 0, AMD = 1 << 0,
/** Intel desktop drivers on Windows */
IntelWindows = 1 << 1,
#endif #endif
#ifdef MAGNUM_TARGET_GLES2 #ifdef MAGNUM_TARGET_GLES2
@ -191,7 +194,7 @@ class MAGNUM_EXPORT Context {
* specification explicitly disallows exposing driver information * specification explicitly disallows exposing driver information
* to the application, this check cannot be done reliably. * to the application, this check cannot be done reliably.
*/ */
ProbablyAngle = 1 << 1 ProbablyAngle = 1 << 2
#endif #endif
}; };

11
src/Magnum/Implementation/detectedDriver.cpp

@ -33,16 +33,23 @@ auto Context::detectedDriver() -> DetectedDrivers {
_detectedDrivers = DetectedDrivers{}; _detectedDrivers = DetectedDrivers{};
/* AMD binary desktop drivers */
#ifndef MAGNUM_TARGET_GLES #ifndef MAGNUM_TARGET_GLES
const std::string vendor = vendorString(); const std::string vendor = vendorString();
/* AMD binary desktop drivers */
if(vendor.find("ATI Technologies Inc.") != std::string::npos) if(vendor.find("ATI Technologies Inc.") != std::string::npos)
return *_detectedDrivers |= DetectedDriver::AMD; return *_detectedDrivers |= DetectedDriver::AMD;
#ifdef CORRADE_TARGET_WINDOWS
/* Intel Windows drivers */
if(vendor.find("Intel") != std::string::npos)
return *_detectedDrivers |= DetectedDriver::IntelWindows;
#endif
#endif #endif
#ifdef MAGNUM_TARGET_GLES2
/* OpenGL ES 2.0 implementation using ANGLE. Taken from /* OpenGL ES 2.0 implementation using ANGLE. Taken from
http://stackoverflow.com/a/20149090 */ http://stackoverflow.com/a/20149090 */
#ifdef MAGNUM_TARGET_GLES2
{ {
Range1Di range; Range1Di range;
glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, range.data()); glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, range.data());

Loading…
Cancel
Save