aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@live.com>2017-04-18 09:07:07 -0500
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-08-07 13:56:05 +0000
commit432e27ae092397cb2154f48103e729852c38cf2d (patch)
tree12c9b108a6e85082d029da994af0f9c7e5ca8d4f /examples
parent5a6887ae8536c0b751e7b870ab629ecbf8784d22 (diff)
Add very basic compressed texture support
Allow direct loading of pkm texture files into Image. This can be extended to additional texture types, and then eventually turned into a full plugin architexture. [ChangeLog][Qt Quick] Allow direct loading of pkm texture files into Image. For example: Image { source: "myImage.pkm" } Change-Id: I1baed6c3e85a15752da8adc675482d874c9355ab Task-number: QTBUG-59872 Task-number: QTBUG-29451 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/textureprovider/main.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/quick/textureprovider/main.cpp b/examples/quick/textureprovider/main.cpp
index ea4f73127d..f92d34ada5 100644
--- a/examples/quick/textureprovider/main.cpp
+++ b/examples/quick/textureprovider/main.cpp
@@ -48,6 +48,10 @@ int main(int argc, char* argv[])
QGuiApplication app(argc,argv);
QQuickView view;
+ /*
+ NOTE: ETC compressed textures in PKM files are supported out-of-the-box since Qt 5.10.
+ However, we retain this example to show how custom texture providers can be integrated.
+ */
EtcProvider *provider = new EtcProvider();
provider->setBaseUrl(QUrl("qrc:///textureprovider/"));
view.engine()->addImageProvider("etc", provider);