aboutsummaryrefslogtreecommitdiffstats
path: root/src/particles/qquickcustomparticle.cpp
diff options
context:
space:
mode:
authorMaciej Kujalowicz <maciej.kujalowicz@trismer.com>2013-11-14 22:45:18 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-15 16:33:39 +0100
commit965607836664741db4e33e05792ec4f59c88dc55 (patch)
tree4e6b4ff209f22f9c6b32acc6a2c6df78038eb75c /src/particles/qquickcustomparticle.cpp
parent5eb2a916a4765564a61975833c2c154ed0431930 (diff)
Remove version definition from custom particle shaders for OpenGL ES.
Since OpenGL ES 2.0 does not support GLSL 1.2, #version 120 must be removed from embedded shaders for a custom particle. Task-number: QTBUG-34854 Change-Id: I8d3e51ff87acc099a53c4e312cd33d02e6a1cb4e Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/particles/qquickcustomparticle.cpp')
-rw-r--r--src/particles/qquickcustomparticle.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/particles/qquickcustomparticle.cpp b/src/particles/qquickcustomparticle.cpp
index 71d58ae391..a3b41d0eb2 100644
--- a/src/particles/qquickcustomparticle.cpp
+++ b/src/particles/qquickcustomparticle.cpp
@@ -276,11 +276,17 @@ QQuickShaderEffectNode *QQuickCustomParticle::prepareNextFrame(QQuickShaderEffec
QSGShaderSourceBuilder builder;
if (s.sourceCode[Key::FragmentShader].isEmpty()) {
builder.appendSourceFile(QStringLiteral(":/particles/shaders/customparticle.frag"));
+#if defined(QT_OPENGL_ES_2)
+ builder.removeVersion();
+#endif
s.sourceCode[Key::FragmentShader] = builder.source();
builder.clear();
}
builder.appendSourceFile(QStringLiteral(":/particles/shaders/customparticletemplate.vert"));
+#if defined(QT_OPENGL_ES_2)
+ builder.removeVersion();
+#endif
if (s.sourceCode[Key::VertexShader].isEmpty())
builder.appendSourceFile(QStringLiteral(":/particles/shaders/customparticle.vert"));
s.sourceCode[Key::VertexShader] = builder.source() + s.sourceCode[Key::VertexShader];