summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2014-06-23 16:20:53 +0200
committerSean Harmer <sean.harmer@kdab.com>2014-06-28 16:50:59 +0200
commit30f47124e594176ed2da3b8f7df6ca13fe2c5d05 (patch)
tree8972dde67ca9321681fe1d83ce820345e08783d3 /examples
parenta6a48a0c838a4f9357b4aa51e9f905ebc00ca454 (diff)
Textures hooked up
This is a first implementation that will need some improvements. Still texture are now handled and can be specified directly as parameters in Material, Effect or Technique which should play nicely along regular uniform QVariant values when we have a custom QML parser. Change-Id: Icd7067f04282fcb15e9edc559aae2bedaaa808c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/simple-qml/main.cpp3
-rw-r--r--examples/simple-qml/main.qml2
2 files changed, 4 insertions, 1 deletions
diff --git a/examples/simple-qml/main.cpp b/examples/simple-qml/main.cpp
index 1efee589c..f6d4168f1 100644
--- a/examples/simple-qml/main.cpp
+++ b/examples/simple-qml/main.cpp
@@ -42,6 +42,7 @@
#include <Qt3DQuick/quickwindow.h>
#include <Qt3DRenderer/rendereraspect.h>
+#include <exampleresources.h>
#include <QGuiApplication>
#include <QtQml>
@@ -50,6 +51,8 @@ int main(int argc, char* argv[])
{
QGuiApplication app(argc, argv);
+ initializeAssetResources("../exampleresources/example-assets.qrb");
+
Qt3D::Quick::QuickWindow view;
view.registerAspect(new Qt3D::RendererAspect());
// There should be some synchronising mechanism to make sure
diff --git a/examples/simple-qml/main.qml b/examples/simple-qml/main.qml
index 9d5f3a2c0..413af7907 100644
--- a/examples/simple-qml/main.qml
+++ b/examples/simple-qml/main.qml
@@ -232,7 +232,7 @@ Node {
Material {
id : ballTexturedMaterial
- parameters : [Parameter { name : "tex"; value : Texture { source : "assets/Wood_Cherry_Original_.jpg" } }]
+ parameters : [Parameter { name : "tex"; value : Texture { source : "assets/gltf/wine/Wood_Cherry_Original_.jpg" } }]
effect : Effect {
techniques : [