diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2015-08-12 12:21:42 -0700 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-08-31 07:56:33 +0000 |
commit | 4ccb954b1c6da94fd4819b933ba331568d5c7bb5 (patch) | |
tree | 4f3c5d936dc2d6b9f862d255b1968097b0d4ebc5 | |
parent | c3d4455b6477d9815e90ef16b176b746a5699ff0 (diff) |
Fix clip-plane-qml on OS X and small tidy up
Change-Id: Ib1e6159a5fb44bfc167c63776bb878c73d043796
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r-- | examples/qt3d/clip-planes-qml/main.qml | 4 | ||||
-rw-r--r-- | examples/qt3d/clip-planes-qml/phong-clip.frag | 4 | ||||
-rw-r--r-- | examples/qt3d/clip-planes-qml/phong-clip.vert | 2 |
3 files changed, 4 insertions, 6 deletions
diff --git a/examples/qt3d/clip-planes-qml/main.qml b/examples/qt3d/clip-planes-qml/main.qml index d12ff44f6..9bb7bd7ad 100644 --- a/examples/qt3d/clip-planes-qml/main.qml +++ b/examples/qt3d/clip-planes-qml/main.qml @@ -86,10 +86,6 @@ Entity { source: "assets/obj/trefoil.obj" } -// property SphereMesh mesh: SphereMesh { -// radius: 3 -// } - property Transform transform: Transform { Translate { dx: 0 } Scale { scale: 3 } diff --git a/examples/qt3d/clip-planes-qml/phong-clip.frag b/examples/qt3d/clip-planes-qml/phong-clip.frag index 6ca37e764..96cb19a33 100644 --- a/examples/qt3d/clip-planes-qml/phong-clip.frag +++ b/examples/qt3d/clip-planes-qml/phong-clip.frag @@ -11,7 +11,7 @@ uniform vec3 ks; // Specular reflectivity uniform float shininess; // Specular shininess factor in VertexData { - in vec4 position; + in vec3 position; in vec3 normal; } v_in; @@ -43,5 +43,5 @@ vec3 adsModel( const in vec3 pos, const in vec3 n ) void main() { - fragColor = vec4( adsModel( v_in.position.xyz, normalize( v_in.normal ) ), 1.0 ); + fragColor = vec4( adsModel( v_in.position, normalize( v_in.normal ) ), 1.0 ); } diff --git a/examples/qt3d/clip-planes-qml/phong-clip.vert b/examples/qt3d/clip-planes-qml/phong-clip.vert index 95b83bf75..29955bb3d 100644 --- a/examples/qt3d/clip-planes-qml/phong-clip.vert +++ b/examples/qt3d/clip-planes-qml/phong-clip.vert @@ -8,6 +8,8 @@ out VertexData { vec3 normal; } v_out; +out float gl_ClipDistance[8]; + struct Section { vec4 equation; vec3 center; |