aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/quickwidgets/quickwidget/qtquickwidgets-example.pngbin11287 -> 0 bytes
-rw-r--r--examples/quick/scenegraph/graph/graph.pro6
-rw-r--r--examples/quick/textureprovider/etcprovider.cpp8
-rw-r--r--examples/quick/textureprovider/etcprovider.h4
4 files changed, 7 insertions, 11 deletions
diff --git a/examples/quick/quickwidgets/quickwidget/qtquickwidgets-example.png b/examples/quick/quickwidgets/quickwidget/qtquickwidgets-example.png
deleted file mode 100644
index d9e710b7e7..0000000000
--- a/examples/quick/quickwidgets/quickwidget/qtquickwidgets-example.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/scenegraph/graph/graph.pro b/examples/quick/scenegraph/graph/graph.pro
index 4699001f6a..1a880b61f1 100644
--- a/examples/quick/scenegraph/graph/graph.pro
+++ b/examples/quick/scenegraph/graph/graph.pro
@@ -1,9 +1,3 @@
-#-------------------------------------------------
-#
-# Project created by QtCreator 2013-06-11T13:13:18
-#
-#-------------------------------------------------
-
QT += core gui quick
TARGET = graph
diff --git a/examples/quick/textureprovider/etcprovider.cpp b/examples/quick/textureprovider/etcprovider.cpp
index 7eff597a43..b9bef84f70 100644
--- a/examples/quick/textureprovider/etcprovider.cpp
+++ b/examples/quick/textureprovider/etcprovider.cpp
@@ -81,7 +81,7 @@ unsigned short getPaddedHeight(ETCHeader *pHeader)
EtcTexture::EtcTexture()
: m_texture_id(0), m_uploaded(false)
{
-
+ initializeOpenGLFunctions();
}
EtcTexture::~EtcTexture()
@@ -92,8 +92,10 @@ EtcTexture::~EtcTexture()
int EtcTexture::textureId() const
{
- if (m_texture_id == 0)
- glGenTextures(1, &const_cast<EtcTexture *>(this)->m_texture_id);
+ if (m_texture_id == 0) {
+ EtcTexture *texture = const_cast<EtcTexture*>(this);
+ texture->glGenTextures(1, &texture->m_texture_id);
+ }
return m_texture_id;
}
diff --git a/examples/quick/textureprovider/etcprovider.h b/examples/quick/textureprovider/etcprovider.h
index a9ec5ed606..e9761e3629 100644
--- a/examples/quick/textureprovider/etcprovider.h
+++ b/examples/quick/textureprovider/etcprovider.h
@@ -34,7 +34,7 @@
#ifndef ETCPROVIDER_H
#define ETCPROVIDER_H
-#include <qopengl.h>
+#include <QOpenGLFunctions>
#include <QQuickImageProvider>
#include <QtQuick/QSGTexture>
#include <QUrl>
@@ -54,7 +54,7 @@ private:
QUrl m_baseUrl;
};
-class EtcTexture : public QSGTexture
+class EtcTexture : public QSGTexture, protected QOpenGLFunctions
{
Q_OBJECT
public: