aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-05-06 10:54:12 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-05-06 11:22:20 +0200
commitafd6c6b905820529b1b46767970bf090d04973a9 (patch)
tree5e628428f350060aef651dea93b5ad1eaf01f670 /examples
parenta714a3a446a47b3ac18de6cea1e6c4ca01535170 (diff)
Remove textureprovider example
Task-number: QTBUG-83978 Change-Id: I8f26ae18dd09209cc1d6bee6e5f0b2f609ec667c Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/CMakeLists.txt1
-rw-r--r--examples/quick/quick.pro1
-rw-r--r--examples/quick/textureprovider/CMakeLists.txt50
-rw-r--r--examples/quick/textureprovider/Label.qml59
-rw-r--r--examples/quick/textureprovider/etcprovider.cpp238
-rw-r--r--examples/quick/textureprovider/etcprovider.h97
-rw-r--r--examples/quick/textureprovider/images/qt-logo.jpgbin19365 -> 0 bytes
-rw-r--r--examples/quick/textureprovider/images/qt-logo.pkmbin32784 -> 0 bytes
-rw-r--r--examples/quick/textureprovider/main.cpp72
-rw-r--r--examples/quick/textureprovider/textureprovider.pro13
-rw-r--r--examples/quick/textureprovider/textureprovider.qml75
-rw-r--r--examples/quick/textureprovider/textureprovider.qrc8
12 files changed, 0 insertions, 614 deletions
diff --git a/examples/quick/CMakeLists.txt b/examples/quick/CMakeLists.txt
index 8940ff9c70..6da827e757 100644
--- a/examples/quick/CMakeLists.txt
+++ b/examples/quick/CMakeLists.txt
@@ -29,7 +29,6 @@ add_subdirectory(particles)
add_subdirectory(delegatechooser)
add_subdirectory(shapes)
if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
- add_subdirectory(textureprovider)
add_subdirectory(rendercontrol)
endif()
if(TARGET Qt::Widgets)
diff --git a/examples/quick/quick.pro b/examples/quick/quick.pro
index 0bb90e737b..df65ea8e17 100644
--- a/examples/quick/quick.pro
+++ b/examples/quick/quick.pro
@@ -31,7 +31,6 @@ SUBDIRS = quick-accessibility \
#OpenGL Support Required
qtConfig(opengl(es1|es2)?) {
SUBDIRS += \
- textureprovider \
rendercontrol
}
diff --git a/examples/quick/textureprovider/CMakeLists.txt b/examples/quick/textureprovider/CMakeLists.txt
deleted file mode 100644
index d43f6a1898..0000000000
--- a/examples/quick/textureprovider/CMakeLists.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-# Generated from textureprovider.pro.
-
-cmake_minimum_required(VERSION 3.14)
-project(textureprovider LANGUAGES CXX)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-set(INSTALL_EXAMPLEDIR "examples/quick/textureprovider")
-
-find_package(Qt6 COMPONENTS Core)
-find_package(Qt6 COMPONENTS Gui)
-find_package(Qt6 COMPONENTS Quick)
-find_package(Qt6 COMPONENTS Qml)
-
-add_qt_gui_executable(textureprovider
- etcprovider.cpp etcprovider.h
- main.cpp
-)
-target_link_libraries(textureprovider PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
-)
-
-
-# Resources:
-set(textureprovider_resource_files
- "Label.qml"
- "images/qt-logo.jpg"
- "images/qt-logo.pkm"
- "textureprovider.qml"
-)
-
-qt6_add_resources(textureprovider "textureprovider"
- PREFIX
- "/textureprovider"
- FILES
- ${textureprovider_resource_files}
-)
-
-install(TARGETS textureprovider
- RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
- BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
- LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
-)
diff --git a/examples/quick/textureprovider/Label.qml b/examples/quick/textureprovider/Label.qml
deleted file mode 100644
index 3df456fa05..0000000000
--- a/examples/quick/textureprovider/Label.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Text {
- font.pixelSize: 26
- style: Text.Outline; styleColor: "white"
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: parent.bottom
- anchors.bottomMargin: 20
-}
diff --git a/examples/quick/textureprovider/etcprovider.cpp b/examples/quick/textureprovider/etcprovider.cpp
deleted file mode 100644
index f542d510b2..0000000000
--- a/examples/quick/textureprovider/etcprovider.cpp
+++ /dev/null
@@ -1,238 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "etcprovider.h"
-
-#include <QFile>
-#include <QDebug>
-#include <qopenglfunctions.h>
-#include <qqmlfile.h>
-
-//#define ETC_DEBUG
-
-#ifndef GL_ETC1_RGB8_OES
- #define GL_ETC1_RGB8_OES 0x8d64
-#endif
-
-typedef struct {
- char aName[6];
- unsigned short iBlank;
- /* NB: Beware endianness issues here. */
- unsigned char iPaddedWidthMSB;
- unsigned char iPaddedWidthLSB;
- unsigned char iPaddedHeightMSB;
- unsigned char iPaddedHeightLSB;
- unsigned char iWidthMSB;
- unsigned char iWidthLSB;
- unsigned char iHeightMSB;
- unsigned char iHeightLSB;
-} ETCHeader;
-
-unsigned short getWidth(ETCHeader *pHeader)
-{
- return (pHeader->iWidthMSB << 8) | pHeader->iWidthLSB;
-}
-
-unsigned short getHeight(ETCHeader *pHeader)
-{
- return (pHeader->iHeightMSB << 8) | pHeader->iHeightLSB;
-}
-
-unsigned short getPaddedWidth(ETCHeader *pHeader)
-{
- return (pHeader->iPaddedWidthMSB << 8) | pHeader->iPaddedWidthLSB;
-}
-
-unsigned short getPaddedHeight(ETCHeader *pHeader)
-{
- return (pHeader->iPaddedHeightMSB << 8) | pHeader->iPaddedHeightLSB;
-}
-
-EtcTexture::EtcTexture()
- : m_texture_id(0), m_uploaded(false)
-{
- initializeOpenGLFunctions();
-}
-
-EtcTexture::~EtcTexture()
-{
- if (m_texture_id)
- glDeleteTextures(1, &m_texture_id);
-}
-
-int EtcTexture::textureId() const
-{
- if (m_texture_id == 0) {
- EtcTexture *texture = const_cast<EtcTexture*>(this);
- texture->glGenTextures(1, &texture->m_texture_id);
- }
- return m_texture_id;
-}
-
-int EtcTexture::comparisonKey() const
-{
- if (m_texture_id)
- return m_texture_id;
-
- // two textures (and so materials) with not-yet-created texture underneath are never equal
- return int(qintptr(this));
-}
-
-void EtcTexture::bind()
-{
- if (m_uploaded && m_texture_id) {
- glBindTexture(GL_TEXTURE_2D, m_texture_id);
- return;
- }
-
- if (m_texture_id == 0)
- glGenTextures(1, &m_texture_id);
- glBindTexture(GL_TEXTURE_2D, m_texture_id);
-
-#ifdef ETC_DEBUG
- qDebug() << "glCompressedTexImage2D, width: " << m_size.width() << "height" << m_size.height() <<
- "paddedWidth: " << m_paddedSize.width() << "paddedHeight: " << m_paddedSize.height();
-#endif
-
-#ifndef QT_NO_DEBUG
- while (glGetError() != GL_NO_ERROR) { }
-#endif
-
- QOpenGLContext *ctx = QOpenGLContext::currentContext();
- Q_ASSERT(ctx != nullptr);
- ctx->functions()->glCompressedTexImage2D(GL_TEXTURE_2D, 0, GL_ETC1_RGB8_OES,
- m_size.width(), m_size.height(), 0,
- (m_paddedSize.width() * m_paddedSize.height()) >> 1,
- m_data.data() + 16);
-
-#ifndef QT_NO_DEBUG
- // Gracefully fail in case of an error...
- GLuint error = glGetError();
- if (error != GL_NO_ERROR) {
- qDebug () << "glCompressedTexImage2D for compressed texture failed, error: " << error;
- glBindTexture(GL_TEXTURE_2D, 0);
- glDeleteTextures(1, &m_texture_id);
- m_texture_id = 0;
- return;
- }
-#endif
-
- m_uploaded = true;
- updateBindOptions(true);
-}
-
-class QEtcTextureFactory : public QQuickTextureFactory
-{
-public:
- QByteArray m_data;
- QSize m_size;
- QSize m_paddedSize;
-
- QSize textureSize() const override { return m_size; }
- int textureByteCount() const override { return m_data.size(); }
-
- QSGTexture *createTexture(QQuickWindow *) const override {
- EtcTexture *texture = new EtcTexture;
- texture->m_data = m_data;
- texture->m_size = m_size;
- texture->m_paddedSize = m_paddedSize;
- return texture;
- }
-};
-
-QQuickTextureFactory *EtcProvider::requestTexture(const QString &id, QSize *size, const QSize &requestedSize)
-{
- Q_UNUSED(requestedSize);
- QEtcTextureFactory *ret = nullptr;
-
- size->setHeight(0);
- size->setWidth(0);
-
- QUrl url = QUrl(id);
- if (url.isRelative() && !m_baseUrl.isEmpty())
- url = m_baseUrl.resolved(url);
- QString path = QQmlFile::urlToLocalFileOrQrc(url);
-
- QFile file(path);
-#ifdef ETC_DEBUG
- qDebug() << "requestTexture opening file: " << path;
-#endif
- if (file.open(QIODevice::ReadOnly)) {
- ret = new QEtcTextureFactory;
- ret->m_data = file.readAll();
- if (!ret->m_data.isEmpty()) {
- ETCHeader *pETCHeader = nullptr;
- pETCHeader = (ETCHeader *)ret->m_data.data();
- size->setHeight(getHeight(pETCHeader));
- size->setWidth(getWidth(pETCHeader));
- ret->m_size = *size;
- ret->m_paddedSize.setHeight(getPaddedHeight(pETCHeader));
- ret->m_paddedSize.setWidth(getPaddedWidth(pETCHeader));
- }
- else {
- delete ret;
- ret = nullptr;
- }
- }
-
-#ifdef ETC_DEBUG
- if (ret)
- qDebug() << "requestTexture returning: " << ret->m_data.length() << ", bytes; width: " << size->width() << ", height: " << size->height();
- else
- qDebug () << "File not found.";
-#endif
-
- return ret;
-}
-
-void EtcProvider::setBaseUrl(const QUrl &base)
-{
- m_baseUrl = base;
-}
diff --git a/examples/quick/textureprovider/etcprovider.h b/examples/quick/textureprovider/etcprovider.h
deleted file mode 100644
index 7de03e0955..0000000000
--- a/examples/quick/textureprovider/etcprovider.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the demonstration applications of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef ETCPROVIDER_H
-#define ETCPROVIDER_H
-
-#include <QOpenGLFunctions>
-#include <QQuickImageProvider>
-#include <QtQuick/QSGTexture>
-#include <QUrl>
-
-class EtcProvider : public QQuickImageProvider
-{
-public:
- EtcProvider()
- : QQuickImageProvider(QQuickImageProvider::Texture)
- {}
-
- QQuickTextureFactory *requestTexture(const QString &id, QSize *size, const QSize &requestedSize);
-
- void setBaseUrl(const QUrl &base);
-
-private:
- QUrl m_baseUrl;
-};
-
-class EtcTexture : public QSGTexture, protected QOpenGLFunctions
-{
- Q_OBJECT
-public:
- EtcTexture();
- ~EtcTexture();
-
- void bind() override;
-
- QSize textureSize() const override { return m_size; }
- int textureId() const override;
- int comparisonKey() const override;
-
- bool hasAlphaChannel() const override { return false; }
- bool hasMipmaps() const override { return false; }
-
- QByteArray m_data;
- QSize m_size;
- QSize m_paddedSize;
- GLuint m_texture_id;
- bool m_uploaded;
-};
-
-#endif // ETCPROVIDER_H
diff --git a/examples/quick/textureprovider/images/qt-logo.jpg b/examples/quick/textureprovider/images/qt-logo.jpg
deleted file mode 100644
index 32d151c2c5..0000000000
--- a/examples/quick/textureprovider/images/qt-logo.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/quick/textureprovider/images/qt-logo.pkm b/examples/quick/textureprovider/images/qt-logo.pkm
deleted file mode 100644
index 3329031ab2..0000000000
--- a/examples/quick/textureprovider/images/qt-logo.pkm
+++ /dev/null
Binary files differ
diff --git a/examples/quick/textureprovider/main.cpp b/examples/quick/textureprovider/main.cpp
deleted file mode 100644
index 658620bc82..0000000000
--- a/examples/quick/textureprovider/main.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QGuiApplication>
-#include <QQuickView>
-
-#include "etcprovider.h"
-
-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);
-
- view.setSource(QUrl("qrc:///textureprovider/textureprovider.qml"));
- view.show();
- return app.exec();
-}
diff --git a/examples/quick/textureprovider/textureprovider.pro b/examples/quick/textureprovider/textureprovider.pro
deleted file mode 100644
index 5d9825f7ac..0000000000
--- a/examples/quick/textureprovider/textureprovider.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-TEMPLATE = app
-
-QT += quick qml
-
-HEADERS += etcprovider.h
-
-SOURCES += main.cpp \
- etcprovider.cpp
-
-RESOURCES += textureprovider.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/quick/textureprovider
-INSTALLS += target
diff --git a/examples/quick/textureprovider/textureprovider.qml b/examples/quick/textureprovider/textureprovider.qml
deleted file mode 100644
index b8cfe31397..0000000000
--- a/examples/quick/textureprovider/textureprovider.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Row {
- width: 512
- height: 256
-
- Image {
- source: "images/qt-logo.jpg"
-
- Label { text: "Original Image" }
- }
-
- Image {
- source: "image://etc/images/qt-logo.pkm"
-
- Label { id: clabel; text: "Compressed Texture" }
- Text {
- text: "(requires ETC1 support)"
- anchors.horizontalCenter: clabel.horizontalCenter
- anchors.top: clabel.bottom
- font.pixelSize: 14
- color: "white"
- }
- }
-}
diff --git a/examples/quick/textureprovider/textureprovider.qrc b/examples/quick/textureprovider/textureprovider.qrc
deleted file mode 100644
index 77a568ba1d..0000000000
--- a/examples/quick/textureprovider/textureprovider.qrc
+++ /dev/null
@@ -1,8 +0,0 @@
-<RCC>
- <qresource prefix="/textureprovider">
- <file>images/qt-logo.jpg</file>
- <file>images/qt-logo.pkm</file>
- <file>textureprovider.qml</file>
- <file>Label.qml</file>
- </qresource>
-</RCC>