From f5b66ed6706c129754a8fc0c0541eab1f9ed4181 Mon Sep 17 00:00:00 2001 From: Kevin Ottens Date: Wed, 25 Jan 2017 12:10:33 +0100 Subject: Consolidate QML/C++ materials in extras We remove the qml implementation of materials in extras that were also implemented in C++. Note this is an API change for the materials having texture properties. The QML ones had mistakenly a string property instead of a texture one. This move also fixes this API issue on the QML end. Change-Id: Ibed14288cd7b8c5ab9615b74b949c6a73ac29329 Reviewed-by: Sean Harmer --- examples/qt3d/materials/Barrel.qml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'examples/qt3d/materials/Barrel.qml') diff --git a/examples/qt3d/materials/Barrel.qml b/examples/qt3d/materials/Barrel.qml index c68cab657..31abd329f 100644 --- a/examples/qt3d/materials/Barrel.qml +++ b/examples/qt3d/materials/Barrel.qml @@ -74,13 +74,11 @@ Entity { material: NormalDiffuseSpecularMapMaterial { id: material ambient: "black" - diffuse: "assets/metalbarrel/diffus_" + root.diffuseColor + ".webp" - normal: "assets/metalbarrel/normal_" + root.bump + ".webp" - specular: { - if (root.specular !== "" ) - return "assets/metalbarrel/specular_" + root.specular + ".webp" - else - return "assets/metalbarrel/specular.webp" + diffuse: TextureLoader { source: "assets/metalbarrel/diffus_" + root.diffuseColor + ".webp" } //TextureLoader { source: ("assets/metalbarrel/diffus_" + root.diffuseColor + ".webp") } + normal: TextureLoader { source: "assets/metalbarrel/normal_" + root.bump + ".webp" } + specular: TextureLoader { + source: root.specular !== "" ? "assets/metalbarrel/specular_" + root.specular + ".webp" + : "assets/metalbarrel/specular.webp" } shininess: 5.0 -- cgit v1.2.3