From 1ae982020d0e4ab0cef9691919af155243faa4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 1 Mar 2019 15:26:50 +0100 Subject: [PATCH] GL: detect ANGLE using the renderer string on non-WebGL platforms. No need to use such hacks there. --- src/Magnum/GL/Implementation/driverSpecific.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Magnum/GL/Implementation/driverSpecific.cpp b/src/Magnum/GL/Implementation/driverSpecific.cpp index 8871dc235..7f77e5112 100644 --- a/src/Magnum/GL/Implementation/driverSpecific.cpp +++ b/src/Magnum/GL/Implementation/driverSpecific.cpp @@ -242,10 +242,12 @@ auto Context::detectedDriver() -> DetectedDrivers { /** @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: - http://stackoverflow.com/a/20149090 - http://webglreport.com - */ + /* ANGLE. Can detect easily on ES, have to resort to hacks on WebGL. + Sources: http://stackoverflow.com/a/20149090 + http://webglreport.com */ + #ifndef MAGNUM_TARGET_WEBGL + if(renderer.find("ANGLE") != std::string::npos) + return *_detectedDrivers |= DetectedDriver::Angle; + #else { Range1Di range; glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, range.data());