summaryrefslogtreecommitdiffstats
path: root/examples/opengl/legacy/overpainting
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/legacy/overpainting')
-rw-r--r--examples/opengl/legacy/overpainting/bubble.cpp122
-rw-r--r--examples/opengl/legacy/overpainting/bubble.h77
-rw-r--r--examples/opengl/legacy/overpainting/glwidget.cpp293
-rw-r--r--examples/opengl/legacy/overpainting/glwidget.h114
-rw-r--r--examples/opengl/legacy/overpainting/main.cpp61
-rw-r--r--examples/opengl/legacy/overpainting/overpainting.pro19
6 files changed, 0 insertions, 686 deletions
diff --git a/examples/opengl/legacy/overpainting/bubble.cpp b/examples/opengl/legacy/overpainting/bubble.cpp
deleted file mode 100644
index 352e359cf9..0000000000
--- a/examples/opengl/legacy/overpainting/bubble.cpp
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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 "bubble.h"
-
-#include <QRandomGenerator>
-
-Bubble::Bubble(const QPointF &position, qreal radius, const QPointF &velocity)
- : position(position), vel(velocity), radius(radius)
-{
- innerColor = randomColor();
- outerColor = randomColor();
- updateBrush();
-}
-
-void Bubble::updateBrush()
-{
- QRadialGradient gradient(QPointF(radius, radius), radius,
- QPointF(radius*0.5, radius*0.5));
-
- gradient.setColorAt(0, QColor(255, 255, 255, 255));
- gradient.setColorAt(0.25, innerColor);
- gradient.setColorAt(1, outerColor);
- brush = QBrush(gradient);
-}
-
-void Bubble::drawBubble(QPainter *painter)
-{
- painter->save();
- painter->translate(position.x() - radius, position.y() - radius);
- painter->setBrush(brush);
- painter->drawEllipse(0, 0, int(2*radius), int(2*radius));
- painter->restore();
-}
-
-QColor Bubble::randomColor()
-{
- int red = int(205 + QRandomGenerator::global()->bounded(50));
- int green = int(205 + QRandomGenerator::global()->bounded(50));
- int blue = int(205 + QRandomGenerator::global()->bounded(50));
- int alpha = int(91 + QRandomGenerator::global()->bounded(100));
-
- return QColor(red, green, blue, alpha);
-}
-
-void Bubble::move(const QRect &bbox)
-{
- position += vel;
- qreal leftOverflow = position.x() - radius - bbox.left();
- qreal rightOverflow = position.x() + radius - bbox.right();
- qreal topOverflow = position.y() - radius - bbox.top();
- qreal bottomOverflow = position.y() + radius - bbox.bottom();
-
- if (leftOverflow < 0.0) {
- position.setX(position.x() - 2 * leftOverflow);
- vel.setX(-vel.x());
- } else if (rightOverflow > 0.0) {
- position.setX(position.x() - 2 * rightOverflow);
- vel.setX(-vel.x());
- }
-
- if (topOverflow < 0.0) {
- position.setY(position.y() - 2 * topOverflow);
- vel.setY(-vel.y());
- } else if (bottomOverflow > 0.0) {
- position.setY(position.y() - 2 * bottomOverflow);
- vel.setY(-vel.y());
- }
-}
-
-QRectF Bubble::rect()
-{
- return QRectF(position.x() - radius, position.y() - radius,
- 2 * radius, 2 * radius);
-}
diff --git a/examples/opengl/legacy/overpainting/bubble.h b/examples/opengl/legacy/overpainting/bubble.h
deleted file mode 100644
index bd63e0437f..0000000000
--- a/examples/opengl/legacy/overpainting/bubble.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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$
-**
-****************************************************************************/
-
-#ifndef BUBBLE_H
-#define BUBBLE_H
-
-#include <QPainter>
-
-class Bubble
-{
-public:
- Bubble(const QPointF &position, qreal radius, const QPointF &velocity);
-
- void drawBubble(QPainter *painter);
- void updateBrush();
- void move(const QRect &bbox);
- QRectF rect();
-
-private:
- QColor randomColor();
-
- QBrush brush;
- QPointF position;
- QPointF vel;
- qreal radius;
- QColor innerColor;
- QColor outerColor;
-};
-
-#endif // BUBBLE_H
diff --git a/examples/opengl/legacy/overpainting/glwidget.cpp b/examples/opengl/legacy/overpainting/glwidget.cpp
deleted file mode 100644
index c4558ce785..0000000000
--- a/examples/opengl/legacy/overpainting/glwidget.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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 "bubble.h"
-#include "qtlogo.h"
-#include "glwidget.h"
-
-#include <QMouseEvent>
-#include <QRandomGenerator>
-#include <QTime>
-
-#include <math.h>
-#include <stdlib.h>
-
-#ifndef GL_MULTISAMPLE
-#define GL_MULTISAMPLE 0x809D
-#endif
-
-//! [0]
-GLWidget::GLWidget(QWidget *parent)
- : QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
-{
- QTime midnight(0, 0, 0);
-
- logo = 0;
- xRot = 0;
- yRot = 0;
- zRot = 0;
-
- qtGreen = QColor::fromCmykF(0.40, 0.0, 1.0, 0.0);
- qtPurple = QColor::fromCmykF(0.39, 0.39, 0.0, 0.0);
-
- animationTimer.setSingleShot(false);
- connect(&animationTimer, SIGNAL(timeout()), this, SLOT(animate()));
- animationTimer.start(25);
-
- setAutoFillBackground(false);
- setMinimumSize(200, 200);
- setWindowTitle(tr("Overpainting a Scene"));
-}
-//! [0]
-
-//! [1]
-GLWidget::~GLWidget()
-{
-}
-//! [1]
-
-static void qNormalizeAngle(int &angle)
-{
- while (angle < 0)
- angle += 360 * 16;
- while (angle > 360 * 16)
- angle -= 360 * 16;
-}
-
-void GLWidget::setXRotation(int angle)
-{
- qNormalizeAngle(angle);
- if (angle != xRot)
- xRot = angle;
-}
-
-void GLWidget::setYRotation(int angle)
-{
- qNormalizeAngle(angle);
- if (angle != yRot)
- yRot = angle;
-}
-
-void GLWidget::setZRotation(int angle)
-{
- qNormalizeAngle(angle);
- if (angle != zRot)
- zRot = angle;
-}
-
-//! [2]
-void GLWidget::initializeGL()
-{
- initializeOpenGLFunctions();
-
- glEnable(GL_MULTISAMPLE);
-
- logo = new QtLogo(this);
- logo->setColor(qtGreen.darker());
-}
-//! [2]
-
-void GLWidget::mousePressEvent(QMouseEvent *event)
-{
- lastPos = event->pos();
-}
-
-void GLWidget::mouseMoveEvent(QMouseEvent *event)
-{
- int dx = event->x() - lastPos.x();
- int dy = event->y() - lastPos.y();
-
- if (event->buttons() & Qt::LeftButton) {
- setXRotation(xRot + 8 * dy);
- setYRotation(yRot + 8 * dx);
- } else if (event->buttons() & Qt::RightButton) {
- setXRotation(xRot + 8 * dy);
- setZRotation(zRot + 8 * dx);
- }
- lastPos = event->pos();
-}
-
-void GLWidget::paintEvent(QPaintEvent *event)
-{
- makeCurrent();
-//! [4]
- glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
-//! [4]
-
-//! [6]
- qglClearColor(qtPurple.darker());
- glShadeModel(GL_SMOOTH);
- glEnable(GL_DEPTH_TEST);
- glEnable(GL_CULL_FACE);
- glEnable(GL_LIGHTING);
- glEnable(GL_LIGHT0);
- glEnable(GL_MULTISAMPLE);
- static GLfloat lightPosition[4] = { 0.5, 5.0, 7.0, 1.0 };
- glLightfv(GL_LIGHT0, GL_POSITION, lightPosition);
-
- qreal pixelRatio = devicePixelRatio();
- setupViewport(width() * pixelRatio, height() * pixelRatio);
-//! [6]
-
-//! [7]
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- glLoadIdentity();
- glTranslatef(0.0, 0.0, -10.0);
- glRotatef(xRot / 16.0, 1.0, 0.0, 0.0);
- glRotatef(yRot / 16.0, 0.0, 1.0, 0.0);
- glRotatef(zRot / 16.0, 0.0, 0.0, 1.0);
-
- logo->draw(static_cast<QOpenGLFunctions_1_1 *>(this));
-//! [7]
-
-//! [8]
- glShadeModel(GL_FLAT);
- glDisable(GL_CULL_FACE);
- glDisable(GL_DEPTH_TEST);
- glDisable(GL_LIGHTING);
-
- glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
-//! [8]
-
-//! [10]
- QPainter painter(this);
- painter.setRenderHint(QPainter::Antialiasing);
- for (Bubble *bubble : qAsConst(bubbles)) {
- if (bubble->rect().intersects(event->rect()))
- bubble->drawBubble(&painter);
- }
- drawInstructions(&painter);
- painter.end();
-}
-//! [10]
-
-//! [11]
-void GLWidget::resizeGL(int width, int height)
-{
- qreal pixelRatio = devicePixelRatio();
- setupViewport(width*pixelRatio, height*pixelRatio);
-}
-//! [11]
-
-//! [12]
-void GLWidget::showEvent(QShowEvent *event)
-{
- Q_UNUSED(event);
- createBubbles(20 - bubbles.count());
-}
-//! [12]
-
-QSize GLWidget::sizeHint() const
-{
- return QSize(400, 400);
-}
-
-void GLWidget::createBubbles(int number)
-{
- for (int i = 0; i < number; ++i) {
- QPointF position(width()*(0.1 + QRandomGenerator::global()->bounded(0.8)),
- height()*(0.1 + QRandomGenerator::global()->bounded(0.8)));
- qreal radius = qMin(width(), height())*(0.0125 + QRandomGenerator::global()->bounded(0.0875));
- QPointF velocity(width()*0.0125*(-0.5 + QRandomGenerator::global()->bounded(1.0)),
- height()*0.0125*(-0.5 + QRandomGenerator::global()->bounded(1.0)));
-
- bubbles.append(new Bubble(position, radius, velocity));
- }
-}
-
-//! [13]
-void GLWidget::animate()
-{
- for (Bubble *bubble : qAsConst(bubbles))
- bubble->move(rect());
- update();
-}
-//! [13]
-
-//! [14]
-void GLWidget::setupViewport(int width, int height)
-{
- int side = qMin(width, height);
- glViewport((width - side) / 2, (height - side) / 2, side, side);
-
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-#ifdef QT_OPENGL_ES
- glOrthof(-0.5, +0.5, -0.5, 0.5, 4.0, 15.0);
-#else
- glOrtho(-0.5, +0.5, -0.5, 0.5, 4.0, 15.0);
-#endif
- glMatrixMode(GL_MODELVIEW);
-}
-//! [14]
-
-//! [15]
-void GLWidget::drawInstructions(QPainter *painter)
-{
- QString text = tr("Click and drag with the left mouse button "
- "to rotate the Qt logo.");
- QFontMetrics metrics = QFontMetrics(font());
- int border = qMax(4, metrics.leading());
-
- QRect rect = metrics.boundingRect(0, 0, width() - 2*border, int(height()*0.125),
- Qt::AlignCenter | Qt::TextWordWrap, text);
- painter->setRenderHint(QPainter::TextAntialiasing);
- painter->fillRect(QRect(0, 0, width(), rect.height() + 2*border),
- QColor(0, 0, 0, 127));
- painter->setPen(Qt::white);
- painter->fillRect(QRect(0, 0, width(), rect.height() + 2*border),
- QColor(0, 0, 0, 127));
- painter->drawText((width() - rect.width())/2, border,
- rect.width(), rect.height(),
- Qt::AlignCenter | Qt::TextWordWrap, text);
-}
-//! [15]
diff --git a/examples/opengl/legacy/overpainting/glwidget.h b/examples/opengl/legacy/overpainting/glwidget.h
deleted file mode 100644
index e5ea539f6d..0000000000
--- a/examples/opengl/legacy/overpainting/glwidget.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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$
-**
-****************************************************************************/
-
-#ifndef GLWIDGET_H
-#define GLWIDGET_H
-
-#include <QGLWidget>
-#include <QOpenGLFunctions_1_1>
-#include <QTimer>
-
-class Bubble;
-class QtLogo;
-
-//! [0]
-class GLWidget : public QGLWidget, public QOpenGLFunctions_1_1
-{
- Q_OBJECT
-
-public:
- GLWidget(QWidget *parent = 0);
- ~GLWidget();
-//! [0]
-
- QSize sizeHint() const override;
- int xRotation() const { return xRot; }
- int yRotation() const { return yRot; }
- int zRotation() const { return zRot; }
-
-public slots:
- void setXRotation(int angle);
- void setYRotation(int angle);
- void setZRotation(int angle);
-
-//! [1]
-protected:
- void initializeGL() override;
- void paintEvent(QPaintEvent *event) override;
- void resizeGL(int width, int height) override;
- void mousePressEvent(QMouseEvent *event) override;
- void mouseMoveEvent(QMouseEvent *event) override;
- void showEvent(QShowEvent *event) override;
-
-private slots:
- void animate();
-
-private:
- void createBubbles(int number);
- void drawInstructions(QPainter *painter);
-//! [1]
- void setupViewport(int width, int height);
-
- QColor qtGreen;
- QColor qtPurple;
-
- GLuint object;
- int xRot;
- int yRot;
- int zRot;
- QPoint lastPos;
-//! [4]
- QtLogo *logo;
- QList<Bubble*> bubbles;
- QTimer animationTimer;
-//! [4]
-};
-
-#endif // GLWIDGET_H
diff --git a/examples/opengl/legacy/overpainting/main.cpp b/examples/opengl/legacy/overpainting/main.cpp
deleted file mode 100644
index c5f0f2e3f7..0000000000
--- a/examples/opengl/legacy/overpainting/main.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 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 "glwidget.h"
-
-#include <QApplication>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- GLWidget window;
- window.show();
- return app.exec();
-}
diff --git a/examples/opengl/legacy/overpainting/overpainting.pro b/examples/opengl/legacy/overpainting/overpainting.pro
deleted file mode 100644
index 17213a6079..0000000000
--- a/examples/opengl/legacy/overpainting/overpainting.pro
+++ /dev/null
@@ -1,19 +0,0 @@
-QT += opengl widgets
-
-VPATH += ../shared
-INCLUDEPATH += ../shared
-
-HEADERS = bubble.h \
- glwidget.h \
- qtlogo.h
-
-SOURCES = bubble.cpp \
- glwidget.cpp \
- main.cpp \
- qtlogo.cpp
-
-# install
-target.path = $$[QT_INSTALL_EXAMPLES]/opengl/legacy/overpainting
-INSTALLS += target
-
-qtConfig(opengles.|angle): error("This example requires Qt to be configured with -opengl desktop")