summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-18 12:43:00 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-18 13:16:42 +0000
commit02b6eb87823d4f3b8217456d389912f73df007af (patch)
tree76a76262382bbd0c544e01d768d6d01f60aae1f6 /src
parentd617cc766994f6c91b314bb1f9d8f00eb41bb7b8 (diff)
Fix default OpenGL filter settings
The API should be ES in an ES-only build of Qt, or when dynamically choosing ANGLE on Windows. The profile should be NoProfile. This is particularly important for systems where requesting a version like 2.0 gives a < 3.2 no profile context instead of >= 3.2 compatibility. The default filter should match both, hence using Compatibility is not an option. Change-Id: Ie8f20b0f09d8d6f6569cfda0f8c2b7217a2e23df Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src')
-rw-r--r--src/render/frontend/qopenglfilter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/frontend/qopenglfilter.cpp b/src/render/frontend/qopenglfilter.cpp
index f690c96a8..b4b16981d 100644
--- a/src/render/frontend/qopenglfilter.cpp
+++ b/src/render/frontend/qopenglfilter.cpp
@@ -36,6 +36,7 @@
#include "qopenglfilter.h"
#include "private/qobject_p.h"
+#include <QOpenGLContext>
QT_BEGIN_NAMESPACE
@@ -47,8 +48,8 @@ public:
QOpenGLFilterPrivate(QOpenGLFilter *qq)
: QObjectPrivate()
- , m_api(QOpenGLFilter::Desktop)
- , m_profile(QOpenGLFilter::Compatibility)
+ , m_api(QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL ? QOpenGLFilter::Desktop : QOpenGLFilter::ES)
+ , m_profile(QOpenGLFilter::None) // matches all (no profile, core, compat)
, m_minor(0)
, m_major(0)
{