summaryrefslogtreecommitdiffstats
path: root/src/render/defaults/qdiffusespecularmapmaterial_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-02 14:03:09 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-02-02 15:33:35 +0000
commit43bb067fc3ec8217ba1064169d9ffdc7e21af7d5 (patch)
treeaae78d3fc5845b3e0220c3a2f3e04dd8d3476e16 /src/render/defaults/qdiffusespecularmapmaterial_p.h
parent75832ffd01c64e30d43e5ff4d13a879750e00cbb (diff)
Remove default uniform values for lightPosition and intensity
The ES2 variants of the shaders have a default uniform value of 0. To be compatible with the other versions, start specifying the values for lightPosition and Intensity from C++, just like we already do from QML. This way the default values are coming from one single unified place regardless of the shader version in use, and examples like simple-cpp will work identically to simple-qml, even on ES2. Change-Id: If60185d0d3039e4354da8cc6e6b21a0db0bae963 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/render/defaults/qdiffusespecularmapmaterial_p.h')
-rw-r--r--src/render/defaults/qdiffusespecularmapmaterial_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/render/defaults/qdiffusespecularmapmaterial_p.h b/src/render/defaults/qdiffusespecularmapmaterial_p.h
index bed6b62ae..8dc642443 100644
--- a/src/render/defaults/qdiffusespecularmapmaterial_p.h
+++ b/src/render/defaults/qdiffusespecularmapmaterial_p.h
@@ -72,6 +72,8 @@ public:
QParameter *m_diffuseParameter;
QParameter *m_specularParameter;
QParameter *m_shininessParameter;
+ QParameter *m_lightPositionParameter;
+ QParameter *m_lightIntensityParameter;
QParameter *m_textureScaleParameter;
QTechnique *m_diffuseSpecularMapGL3Technique;
QTechnique *m_diffuseSpecularMapGL2Technique;