summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2017-05-02 19:15:38 +0100
committerMike Krus <mike.krus@kdab.com>2017-05-03 20:24:34 +0000
commit1d3ffb4cadfd43e163bf977c03a48f3b9cbb1f30 (patch)
tree1948e43218d57061e04dc1cff2f15d5637f69370 /examples
parent629e5ed81b9b584196beafdddccdd85365510975 (diff)
Correct shader typo for rendering and fix shader selection
Task-number: QTBUG-60288 Change-Id: I320f787c3b245cc52df80d89c75f856aeacf649d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/qt3d/advancedcustommaterial/WaterMaterial.qml5
-rw-r--r--examples/qt3d/advancedcustommaterial/shaders/gl3/water.frag2
2 files changed, 3 insertions, 4 deletions
diff --git a/examples/qt3d/advancedcustommaterial/WaterMaterial.qml b/examples/qt3d/advancedcustommaterial/WaterMaterial.qml
index 2c5410bea..b67e8322c 100644
--- a/examples/qt3d/advancedcustommaterial/WaterMaterial.qml
+++ b/examples/qt3d/advancedcustommaterial/WaterMaterial.qml
@@ -228,12 +228,11 @@ Material {
}
},
- // OpenGL 2.0
+ // OpenGLES 2.0
Technique {
filterKeys: [ forward ]
graphicsApiFilter {
- api: GraphicsApiFilter.OpenGL
- profile: GraphicsApiFilter.NoProfile
+ api: GraphicsApiFilter.OpenGLES
majorVersion: 2
minorVersion: 0
}
diff --git a/examples/qt3d/advancedcustommaterial/shaders/gl3/water.frag b/examples/qt3d/advancedcustommaterial/shaders/gl3/water.frag
index ae40bdf37..9657cc63a 100644
--- a/examples/qt3d/advancedcustommaterial/shaders/gl3/water.frag
+++ b/examples/qt3d/advancedcustommaterial/shaders/gl3/water.frag
@@ -39,7 +39,7 @@ void main()
vec2 waveMovCoord = waveTexCoord;
waveMovCoord.x += offsetx;
waveMovCoord.y -= offsety;
- vec4 wave = texture2D(waveTexture, waveMovCoord);
+ vec4 wave = texture(waveTexture, waveMovCoord);
//Wiggle the newCoord by r and b colors of waveTexture
vec2 newCoord = texCoord;