diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-06-29 17:53:13 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2016-07-01 11:36:58 +0000 |
commit | da839643397dda062cf7371e01fc1c990b7cf7c3 (patch) | |
tree | c84bc317ee0aab06e762a5466274787190aa4180 /src/quick/items/qquickopenglshadereffect_p.h | |
parent | 023170b8276659118fd28d787597d749f80501e9 (diff) |
Add a core profile file selector to OpenGL ShaderEffect
Similarly to what we do with "hlsl" in the D3D12 backend, we can use
"glslcore" to provide a file-based alternative to the GraphcsInfo or
OpenGLInfo-based conditions in the fragmentShader and vertexShader
properties. This is particularly useful in a few places inside Qt,
for example Quick Controls, that have to cater to all possiblities.
Change-Id: I5d89e7b1534afbc323a663869bab7796bd1a337d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items/qquickopenglshadereffect_p.h')
-rw-r--r-- | src/quick/items/qquickopenglshadereffect_p.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/quick/items/qquickopenglshadereffect_p.h b/src/quick/items/qquickopenglshadereffect_p.h index bc60ba1e83..062eedd744 100644 --- a/src/quick/items/qquickopenglshadereffect_p.h +++ b/src/quick/items/qquickopenglshadereffect_p.h @@ -66,6 +66,7 @@ QT_BEGIN_NAMESPACE class QSGContext; class QSignalMapper; +class QFileSelector; class QQuickOpenGLCustomMaterialShader; // Common class for QQuickOpenGLShaderEffect and QQuickCustomParticle. @@ -74,7 +75,7 @@ struct Q_QUICK_PRIVATE_EXPORT QQuickOpenGLShaderEffectCommon typedef QQuickOpenGLShaderEffectMaterialKey Key; typedef QQuickOpenGLShaderEffectMaterial::UniformData UniformData; - QQuickOpenGLShaderEffectCommon(QObject *host) : host(host) { } + QQuickOpenGLShaderEffectCommon(QObject *host) : host(host), fileSelector(nullptr) { } ~QQuickOpenGLShaderEffectCommon(); void disconnectPropertySignals(QQuickItem *item, Key::ShaderType shaderType); void connectPropertySignals(QQuickItem *item, Key::ShaderType shaderType); @@ -95,6 +96,7 @@ struct Q_QUICK_PRIVATE_EXPORT QQuickOpenGLShaderEffectCommon QVector<UniformData> uniformData[Key::ShaderTypeCount]; QVector<QSignalMapper *> signalMappers[Key::ShaderTypeCount]; QString parseLog; + QFileSelector *fileSelector; }; |