summaryrefslogtreecommitdiffstats
path: root/examples/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl')
-rw-r--r--examples/opengl/2dpainting/glwidget.cpp8
-rw-r--r--examples/opengl/2dpainting/glwidget.h8
-rw-r--r--examples/opengl/2dpainting/helper.cpp8
-rw-r--r--examples/opengl/2dpainting/helper.h8
-rw-r--r--examples/opengl/2dpainting/main.cpp8
-rw-r--r--examples/opengl/2dpainting/widget.cpp8
-rw-r--r--examples/opengl/2dpainting/widget.h8
-rw-r--r--examples/opengl/2dpainting/window.cpp8
-rw-r--r--examples/opengl/2dpainting/window.h8
-rw-r--r--examples/opengl/contextinfo/main.cpp8
-rw-r--r--examples/opengl/contextinfo/renderwindow.cpp8
-rw-r--r--examples/opengl/contextinfo/renderwindow.h8
-rw-r--r--examples/opengl/contextinfo/widget.cpp11
-rw-r--r--examples/opengl/contextinfo/widget.h8
-rw-r--r--examples/opengl/cube/geometryengine.cpp8
-rw-r--r--examples/opengl/cube/geometryengine.h8
-rw-r--r--examples/opengl/cube/main.cpp8
-rw-r--r--examples/opengl/cube/mainwidget.cpp8
-rw-r--r--examples/opengl/cube/mainwidget.h8
-rw-r--r--examples/opengl/doc/src/2dpainting.qdoc12
-rw-r--r--examples/opengl/doc/src/cube.qdoc12
-rw-r--r--examples/opengl/doc/src/hellogl2.qdoc12
-rw-r--r--examples/opengl/doc/src/textures.qdoc12
-rw-r--r--examples/opengl/hellogl2/glwidget.cpp8
-rw-r--r--examples/opengl/hellogl2/glwidget.h8
-rw-r--r--examples/opengl/hellogl2/logo.cpp8
-rw-r--r--examples/opengl/hellogl2/logo.h8
-rw-r--r--examples/opengl/hellogl2/main.cpp8
-rw-r--r--examples/opengl/hellogl2/mainwindow.cpp8
-rw-r--r--examples/opengl/hellogl2/mainwindow.h8
-rw-r--r--examples/opengl/hellogl2/window.cpp8
-rw-r--r--examples/opengl/hellogl2/window.h8
-rw-r--r--examples/opengl/hellowindow/hellowindow.cpp24
-rw-r--r--examples/opengl/hellowindow/hellowindow.h12
-rw-r--r--examples/opengl/hellowindow/main.cpp26
-rw-r--r--examples/opengl/legacy/framebufferobject2/glwidget.cpp8
-rw-r--r--examples/opengl/legacy/framebufferobject2/glwidget.h8
-rw-r--r--examples/opengl/legacy/framebufferobject2/main.cpp8
-rw-r--r--examples/opengl/legacy/grabber/glwidget.cpp8
-rw-r--r--examples/opengl/legacy/grabber/glwidget.h8
-rw-r--r--examples/opengl/legacy/grabber/main.cpp8
-rw-r--r--examples/opengl/legacy/grabber/mainwindow.cpp8
-rw-r--r--examples/opengl/legacy/grabber/mainwindow.h8
-rw-r--r--examples/opengl/legacy/hellogl/glwidget.cpp8
-rw-r--r--examples/opengl/legacy/hellogl/glwidget.h8
-rw-r--r--examples/opengl/legacy/hellogl/main.cpp8
-rw-r--r--examples/opengl/legacy/hellogl/window.cpp8
-rw-r--r--examples/opengl/legacy/hellogl/window.h8
-rw-r--r--examples/opengl/legacy/overpainting/bubble.cpp8
-rw-r--r--examples/opengl/legacy/overpainting/bubble.h8
-rw-r--r--examples/opengl/legacy/overpainting/glwidget.cpp8
-rw-r--r--examples/opengl/legacy/overpainting/glwidget.h8
-rw-r--r--examples/opengl/legacy/overpainting/main.cpp8
-rw-r--r--examples/opengl/legacy/pbuffers/cube.cpp8
-rw-r--r--examples/opengl/legacy/pbuffers/cube.h8
-rw-r--r--examples/opengl/legacy/pbuffers/glwidget.cpp8
-rw-r--r--examples/opengl/legacy/pbuffers/glwidget.h8
-rw-r--r--examples/opengl/legacy/pbuffers/main.cpp8
-rw-r--r--examples/opengl/legacy/pbuffers2/glwidget.cpp8
-rw-r--r--examples/opengl/legacy/pbuffers2/glwidget.h8
-rw-r--r--examples/opengl/legacy/pbuffers2/main.cpp8
-rw-r--r--examples/opengl/legacy/samplebuffers/glwidget.cpp8
-rw-r--r--examples/opengl/legacy/samplebuffers/glwidget.h8
-rw-r--r--examples/opengl/legacy/samplebuffers/main.cpp8
-rw-r--r--examples/opengl/legacy/shared/qtlogo.cpp8
-rw-r--r--examples/opengl/legacy/shared/qtlogo.h8
-rw-r--r--examples/opengl/paintedwindow/main.cpp8
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.cpp8
-rw-r--r--examples/opengl/paintedwindow/paintedwindow.h8
-rw-r--r--examples/opengl/qopenglwidget/bubble.cpp8
-rw-r--r--examples/opengl/qopenglwidget/bubble.h8
-rw-r--r--examples/opengl/qopenglwidget/glwidget.cpp8
-rw-r--r--examples/opengl/qopenglwidget/glwidget.h8
-rw-r--r--examples/opengl/qopenglwidget/main.cpp8
-rw-r--r--examples/opengl/qopenglwidget/mainwindow.cpp8
-rw-r--r--examples/opengl/qopenglwidget/mainwindow.h8
-rw-r--r--examples/opengl/qopenglwindow/background.frag13
-rw-r--r--examples/opengl/qopenglwindow/background_renderer.cpp22
-rw-r--r--examples/opengl/qopenglwindow/background_renderer.h8
-rw-r--r--examples/opengl/qopenglwindow/main.cpp10
-rw-r--r--examples/opengl/textures/glwidget.cpp8
-rw-r--r--examples/opengl/textures/glwidget.h8
-rw-r--r--examples/opengl/textures/main.cpp8
-rw-r--r--examples/opengl/textures/window.cpp8
-rw-r--r--examples/opengl/textures/window.h8
-rw-r--r--examples/opengl/threadedqopenglwidget/glwidget.cpp8
-rw-r--r--examples/opengl/threadedqopenglwidget/glwidget.h8
-rw-r--r--examples/opengl/threadedqopenglwidget/main.cpp8
-rw-r--r--examples/opengl/threadedqopenglwidget/mainwindow.cpp8
-rw-r--r--examples/opengl/threadedqopenglwidget/mainwindow.h8
90 files changed, 413 insertions, 385 deletions
diff --git a/examples/opengl/2dpainting/glwidget.cpp b/examples/opengl/2dpainting/glwidget.cpp
index 5e040ae347..f04722c67d 100644
--- a/examples/opengl/2dpainting/glwidget.cpp
+++ b/examples/opengl/2dpainting/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/2dpainting/glwidget.h b/examples/opengl/2dpainting/glwidget.h
index 07b279117c..b0449db334 100644
--- a/examples/opengl/2dpainting/glwidget.h
+++ b/examples/opengl/2dpainting/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/2dpainting/helper.cpp b/examples/opengl/2dpainting/helper.cpp
index a07266a6e5..d84857f601 100644
--- a/examples/opengl/2dpainting/helper.cpp
+++ b/examples/opengl/2dpainting/helper.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/2dpainting/helper.h b/examples/opengl/2dpainting/helper.h
index ec8dad1e7b..6436a60b3c 100644
--- a/examples/opengl/2dpainting/helper.h
+++ b/examples/opengl/2dpainting/helper.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/2dpainting/main.cpp b/examples/opengl/2dpainting/main.cpp
index fb3454b1cd..cb0e327584 100644
--- a/examples/opengl/2dpainting/main.cpp
+++ b/examples/opengl/2dpainting/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/2dpainting/widget.cpp b/examples/opengl/2dpainting/widget.cpp
index edfff5ba79..f374b8746b 100644
--- a/examples/opengl/2dpainting/widget.cpp
+++ b/examples/opengl/2dpainting/widget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/2dpainting/widget.h b/examples/opengl/2dpainting/widget.h
index 9e2602e73c..d0c3e315bd 100644
--- a/examples/opengl/2dpainting/widget.h
+++ b/examples/opengl/2dpainting/widget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/2dpainting/window.cpp b/examples/opengl/2dpainting/window.cpp
index 3525577220..e10d862607 100644
--- a/examples/opengl/2dpainting/window.cpp
+++ b/examples/opengl/2dpainting/window.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/2dpainting/window.h b/examples/opengl/2dpainting/window.h
index 82571b60cb..7c8556509e 100644
--- a/examples/opengl/2dpainting/window.h
+++ b/examples/opengl/2dpainting/window.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/contextinfo/main.cpp b/examples/opengl/contextinfo/main.cpp
index bc6363b31a..0a75e10b29 100644
--- a/examples/opengl/contextinfo/main.cpp
+++ b/examples/opengl/contextinfo/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/contextinfo/renderwindow.cpp b/examples/opengl/contextinfo/renderwindow.cpp
index af51de1d67..9d7e2c450e 100644
--- a/examples/opengl/contextinfo/renderwindow.cpp
+++ b/examples/opengl/contextinfo/renderwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/contextinfo/renderwindow.h b/examples/opengl/contextinfo/renderwindow.h
index 36b15fd22b..8e1f4cd132 100644
--- a/examples/opengl/contextinfo/renderwindow.h
+++ b/examples/opengl/contextinfo/renderwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/contextinfo/widget.cpp b/examples/opengl/contextinfo/widget.cpp
index 4ab62ec2d2..c318accf87 100644
--- a/examples/opengl/contextinfo/widget.cpp
+++ b/examples/opengl/contextinfo/widget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
@@ -78,7 +78,8 @@ static struct Version versions[] = {
{ "4.1", 4, 1 },
{ "4.2", 4, 2 },
{ "4.3", 4, 3 },
- { "4.4", 4, 4 }
+ { "4.4", 4, 4 },
+ { "4.5", 4, 5 }
};
struct Profile {
diff --git a/examples/opengl/contextinfo/widget.h b/examples/opengl/contextinfo/widget.h
index ad664178e4..9e11a6c07e 100644
--- a/examples/opengl/contextinfo/widget.h
+++ b/examples/opengl/contextinfo/widget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/cube/geometryengine.cpp b/examples/opengl/cube/geometryengine.cpp
index 618a080c37..d4b3f0c0d8 100644
--- a/examples/opengl/cube/geometryengine.cpp
+++ b/examples/opengl/cube/geometryengine.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/cube/geometryengine.h b/examples/opengl/cube/geometryengine.h
index 0b51ebf5f2..4a823ac186 100644
--- a/examples/opengl/cube/geometryengine.h
+++ b/examples/opengl/cube/geometryengine.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/cube/main.cpp b/examples/opengl/cube/main.cpp
index 73363da016..1eed2c8747 100644
--- a/examples/opengl/cube/main.cpp
+++ b/examples/opengl/cube/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/cube/mainwidget.cpp b/examples/opengl/cube/mainwidget.cpp
index b5a7a972d1..8d262f3ee4 100644
--- a/examples/opengl/cube/mainwidget.cpp
+++ b/examples/opengl/cube/mainwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/cube/mainwidget.h b/examples/opengl/cube/mainwidget.h
index 8aff8f7714..011798959a 100644
--- a/examples/opengl/cube/mainwidget.h
+++ b/examples/opengl/cube/mainwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/doc/src/2dpainting.qdoc b/examples/opengl/doc/src/2dpainting.qdoc
index 9bd6e5dea0..ce1312d40b 100644
--- a/examples/opengl/doc/src/2dpainting.qdoc
+++ b/examples/opengl/doc/src/2dpainting.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/examples/opengl/doc/src/cube.qdoc b/examples/opengl/doc/src/cube.qdoc
index 23c15f9c43..185e2aab85 100644
--- a/examples/opengl/doc/src/cube.qdoc
+++ b/examples/opengl/doc/src/cube.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/examples/opengl/doc/src/hellogl2.qdoc b/examples/opengl/doc/src/hellogl2.qdoc
index adaf9d4719..1466b539eb 100644
--- a/examples/opengl/doc/src/hellogl2.qdoc
+++ b/examples/opengl/doc/src/hellogl2.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/examples/opengl/doc/src/textures.qdoc b/examples/opengl/doc/src/textures.qdoc
index d63ac274c0..54bb3a0d57 100644
--- a/examples/opengl/doc/src/textures.qdoc
+++ b/examples/opengl/doc/src/textures.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
@@ -10,15 +10,15 @@
** 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 Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
+** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: http://www.gnu.org/copyleft/fdl.html.
** $QT_END_LICENSE$
diff --git a/examples/opengl/hellogl2/glwidget.cpp b/examples/opengl/hellogl2/glwidget.cpp
index 7764fa8dfc..9738dcda20 100644
--- a/examples/opengl/hellogl2/glwidget.cpp
+++ b/examples/opengl/hellogl2/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellogl2/glwidget.h b/examples/opengl/hellogl2/glwidget.h
index 2d642649f1..6593f6b383 100644
--- a/examples/opengl/hellogl2/glwidget.h
+++ b/examples/opengl/hellogl2/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellogl2/logo.cpp b/examples/opengl/hellogl2/logo.cpp
index 1ba47ddfb5..05c6e4c1b5 100644
--- a/examples/opengl/hellogl2/logo.cpp
+++ b/examples/opengl/hellogl2/logo.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellogl2/logo.h b/examples/opengl/hellogl2/logo.h
index 29bb7fa241..9ae2ca0725 100644
--- a/examples/opengl/hellogl2/logo.h
+++ b/examples/opengl/hellogl2/logo.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellogl2/main.cpp b/examples/opengl/hellogl2/main.cpp
index 2d439878e4..4dc67f6e15 100644
--- a/examples/opengl/hellogl2/main.cpp
+++ b/examples/opengl/hellogl2/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellogl2/mainwindow.cpp b/examples/opengl/hellogl2/mainwindow.cpp
index ee85cda35c..104cf24b37 100644
--- a/examples/opengl/hellogl2/mainwindow.cpp
+++ b/examples/opengl/hellogl2/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellogl2/mainwindow.h b/examples/opengl/hellogl2/mainwindow.h
index 53d4555ce8..4a249946ef 100644
--- a/examples/opengl/hellogl2/mainwindow.h
+++ b/examples/opengl/hellogl2/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellogl2/window.cpp b/examples/opengl/hellogl2/window.cpp
index 0b20870487..e60de3b05b 100644
--- a/examples/opengl/hellogl2/window.cpp
+++ b/examples/opengl/hellogl2/window.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellogl2/window.h b/examples/opengl/hellogl2/window.h
index a850bd6a5a..53f321824c 100644
--- a/examples/opengl/hellogl2/window.h
+++ b/examples/opengl/hellogl2/window.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp
index 57eb111edb..7674ffaed8 100644
--- a/examples/opengl/hellowindow/hellowindow.cpp
+++ b/examples/opengl/hellowindow/hellowindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
@@ -56,9 +56,14 @@ Renderer::Renderer(const QSurfaceFormat &format, Renderer *share, QScreen *scree
if (share)
m_context->setShareContext(share->m_context);
m_context->create();
+
+ m_backgroundColor = QColor::fromRgbF(0.1f, 0.1f, 0.2f, 1.0f);
+ m_backgroundColor.setRed(qrand() % 64);
+ m_backgroundColor.setGreen(qrand() % 128);
+ m_backgroundColor.setBlue(qrand() % 256);
}
-HelloWindow::HelloWindow(const QSharedPointer<Renderer> &renderer)
+HelloWindow::HelloWindow(const QSharedPointer<Renderer> &renderer, QScreen *screen)
: m_colorIndex(0), m_renderer(renderer)
{
setSurfaceType(QWindow::OpenGLSurface);
@@ -67,6 +72,8 @@ HelloWindow::HelloWindow(const QSharedPointer<Renderer> &renderer)
setGeometry(QRect(10, 10, 640, 480));
setFormat(renderer->format());
+ if (screen)
+ setScreen(screen);
create();
@@ -147,7 +154,7 @@ void Renderer::render()
f->glViewport(0, 0, viewSize.width() * surface->devicePixelRatio(), viewSize.height() * surface->devicePixelRatio());
f->glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
- f->glClearColor(0.1f, 0.1f, 0.2f, 1.0f);
+ f->glClearColor(m_backgroundColor.redF(), m_backgroundColor.greenF(), m_backgroundColor.blueF(), m_backgroundColor.alphaF());
f->glFrontFace(GL_CW);
f->glCullFace(GL_FRONT);
f->glEnable(GL_CULL_FACE);
@@ -180,8 +187,13 @@ void Renderer::render()
QTimer::singleShot(0, this, SLOT(render()));
}
+Q_GLOBAL_STATIC(QMutex, initMutex)
+
void Renderer::initialize()
{
+ // Threaded shader compilation can confuse some drivers. Avoid it.
+ QMutexLocker lock(initMutex());
+
QOpenGLShader *vshader = new QOpenGLShader(QOpenGLShader::Vertex, this);
vshader->compileSourceCode(
"attribute highp vec4 vertex;"
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h
index 6a6fa275e2..7b2b1fcdf6 100644
--- a/examples/opengl/hellowindow/hellowindow.h
+++ b/examples/opengl/hellowindow/hellowindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
@@ -90,12 +90,14 @@ private:
int m_currentWindow;
QMutex m_windowLock;
+
+ QColor m_backgroundColor;
};
class HelloWindow : public QWindow
{
public:
- explicit HelloWindow(const QSharedPointer<Renderer> &renderer);
+ explicit HelloWindow(const QSharedPointer<Renderer> &renderer, QScreen *screen = 0);
QColor color() const;
void updateColor();
diff --git a/examples/opengl/hellowindow/main.cpp b/examples/opengl/hellowindow/main.cpp
index 62b6bfca3f..716280aa5f 100644
--- a/examples/opengl/hellowindow/main.cpp
+++ b/examples/opengl/hellowindow/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
@@ -50,7 +50,9 @@ int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
+ // Some platforms can only have one window per screen. Therefore we need to differentiate.
const bool multipleWindows = QGuiApplication::arguments().contains(QStringLiteral("--multiple"));
+ const bool multipleScreens = QGuiApplication::arguments().contains(QStringLiteral("--multiscreen"));
QScreen *screen = QGuiApplication::primaryScreen();
@@ -93,12 +95,13 @@ int main(int argc, char *argv[])
windowC->setTitle(QStringLiteral("Thread B - Context B"));
windowC->setVisible(true);
windows.prepend(windowC);
-
+ }
+ if (multipleScreens) {
for (int i = 1; i < QGuiApplication::screens().size(); ++i) {
QScreen *screen = QGuiApplication::screens().at(i);
QSharedPointer<Renderer> renderer(new Renderer(format, rendererA.data(), screen));
- renderThread = new QThread;
+ QThread *renderThread = new QThread;
renderer->moveToThread(renderThread);
renderThreads.prepend(renderThread);
@@ -107,8 +110,7 @@ int main(int argc, char *argv[])
QSize windowSize = screenGeometry.size() * 0.8;
- HelloWindow *window = new HelloWindow(renderer);
- window->setScreen(screen);
+ HelloWindow *window = new HelloWindow(renderer, screen);
window->setGeometry(QRect(center, windowSize).translated(-windowSize.width() / 2, -windowSize.height() / 2));
QChar id = QChar('B' + i);
@@ -123,10 +125,16 @@ int main(int argc, char *argv[])
renderThreads.at(i)->start();
}
+ // Quit after 10 seconds. For platforms that do not have windows that are closeable.
+ if (QCoreApplication::arguments().contains(QStringLiteral("--timeout")))
+ QTimer::singleShot(10000, qGuiApp, SLOT(quit()));
+
const int exitValue = app.exec();
- for (int i = 0; i < renderThreads.size(); ++i)
+ for (int i = 0; i < renderThreads.size(); ++i) {
+ renderThreads.at(i)->quit(); // some platforms may not have windows to close so ensure quit()
renderThreads.at(i)->wait();
+ }
qDeleteAll(windows);
qDeleteAll(renderThreads);
diff --git a/examples/opengl/legacy/framebufferobject2/glwidget.cpp b/examples/opengl/legacy/framebufferobject2/glwidget.cpp
index 32b9799a4a..4eebe0fecd 100644
--- a/examples/opengl/legacy/framebufferobject2/glwidget.cpp
+++ b/examples/opengl/legacy/framebufferobject2/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/framebufferobject2/glwidget.h b/examples/opengl/legacy/framebufferobject2/glwidget.h
index 2991a4fdf2..4a4844a0db 100644
--- a/examples/opengl/legacy/framebufferobject2/glwidget.h
+++ b/examples/opengl/legacy/framebufferobject2/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/framebufferobject2/main.cpp b/examples/opengl/legacy/framebufferobject2/main.cpp
index 4c9aa9840f..b495681e0d 100644
--- a/examples/opengl/legacy/framebufferobject2/main.cpp
+++ b/examples/opengl/legacy/framebufferobject2/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/grabber/glwidget.cpp b/examples/opengl/legacy/grabber/glwidget.cpp
index abe3a8540a..0fb514059e 100644
--- a/examples/opengl/legacy/grabber/glwidget.cpp
+++ b/examples/opengl/legacy/grabber/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/grabber/glwidget.h b/examples/opengl/legacy/grabber/glwidget.h
index 12071be173..78b2337089 100644
--- a/examples/opengl/legacy/grabber/glwidget.h
+++ b/examples/opengl/legacy/grabber/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/grabber/main.cpp b/examples/opengl/legacy/grabber/main.cpp
index 145e4120ef..3f0e87c4e7 100644
--- a/examples/opengl/legacy/grabber/main.cpp
+++ b/examples/opengl/legacy/grabber/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/grabber/mainwindow.cpp b/examples/opengl/legacy/grabber/mainwindow.cpp
index 9f82ee10ba..702a284f26 100644
--- a/examples/opengl/legacy/grabber/mainwindow.cpp
+++ b/examples/opengl/legacy/grabber/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/grabber/mainwindow.h b/examples/opengl/legacy/grabber/mainwindow.h
index a7895bf4c4..dd20b7d598 100644
--- a/examples/opengl/legacy/grabber/mainwindow.h
+++ b/examples/opengl/legacy/grabber/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/hellogl/glwidget.cpp b/examples/opengl/legacy/hellogl/glwidget.cpp
index 3a9faaca5f..02501cd99e 100644
--- a/examples/opengl/legacy/hellogl/glwidget.cpp
+++ b/examples/opengl/legacy/hellogl/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/hellogl/glwidget.h b/examples/opengl/legacy/hellogl/glwidget.h
index 0989be1dc6..994e38e13d 100644
--- a/examples/opengl/legacy/hellogl/glwidget.h
+++ b/examples/opengl/legacy/hellogl/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/hellogl/main.cpp b/examples/opengl/legacy/hellogl/main.cpp
index 2e83a11e95..7a817ceb56 100644
--- a/examples/opengl/legacy/hellogl/main.cpp
+++ b/examples/opengl/legacy/hellogl/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/hellogl/window.cpp b/examples/opengl/legacy/hellogl/window.cpp
index 2a85bbec57..acd8b60552 100644
--- a/examples/opengl/legacy/hellogl/window.cpp
+++ b/examples/opengl/legacy/hellogl/window.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/hellogl/window.h b/examples/opengl/legacy/hellogl/window.h
index 900e6b13fc..062ef7ed1e 100644
--- a/examples/opengl/legacy/hellogl/window.h
+++ b/examples/opengl/legacy/hellogl/window.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/overpainting/bubble.cpp b/examples/opengl/legacy/overpainting/bubble.cpp
index dbcb72bc93..67c9f08505 100644
--- a/examples/opengl/legacy/overpainting/bubble.cpp
+++ b/examples/opengl/legacy/overpainting/bubble.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/overpainting/bubble.h b/examples/opengl/legacy/overpainting/bubble.h
index 10d24b8af7..501a3bfa9d 100644
--- a/examples/opengl/legacy/overpainting/bubble.h
+++ b/examples/opengl/legacy/overpainting/bubble.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/overpainting/glwidget.cpp b/examples/opengl/legacy/overpainting/glwidget.cpp
index 420ae3e881..b41bc31126 100644
--- a/examples/opengl/legacy/overpainting/glwidget.cpp
+++ b/examples/opengl/legacy/overpainting/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/overpainting/glwidget.h b/examples/opengl/legacy/overpainting/glwidget.h
index 1d1d48458d..dd5c0ba9ff 100644
--- a/examples/opengl/legacy/overpainting/glwidget.h
+++ b/examples/opengl/legacy/overpainting/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/overpainting/main.cpp b/examples/opengl/legacy/overpainting/main.cpp
index 57c520b528..a56aeba297 100644
--- a/examples/opengl/legacy/overpainting/main.cpp
+++ b/examples/opengl/legacy/overpainting/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/pbuffers/cube.cpp b/examples/opengl/legacy/pbuffers/cube.cpp
index dc1bb23fea..f147667fe5 100644
--- a/examples/opengl/legacy/pbuffers/cube.cpp
+++ b/examples/opengl/legacy/pbuffers/cube.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/pbuffers/cube.h b/examples/opengl/legacy/pbuffers/cube.h
index 05017cb376..5247d56adf 100644
--- a/examples/opengl/legacy/pbuffers/cube.h
+++ b/examples/opengl/legacy/pbuffers/cube.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/pbuffers/glwidget.cpp b/examples/opengl/legacy/pbuffers/glwidget.cpp
index b319951ccd..5b4a4a6b8d 100644
--- a/examples/opengl/legacy/pbuffers/glwidget.cpp
+++ b/examples/opengl/legacy/pbuffers/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/pbuffers/glwidget.h b/examples/opengl/legacy/pbuffers/glwidget.h
index 1d23b7772a..f055a99982 100644
--- a/examples/opengl/legacy/pbuffers/glwidget.h
+++ b/examples/opengl/legacy/pbuffers/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/pbuffers/main.cpp b/examples/opengl/legacy/pbuffers/main.cpp
index 8be6640e92..7469024640 100644
--- a/examples/opengl/legacy/pbuffers/main.cpp
+++ b/examples/opengl/legacy/pbuffers/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/pbuffers2/glwidget.cpp b/examples/opengl/legacy/pbuffers2/glwidget.cpp
index de30bb8b21..eddaa9a788 100644
--- a/examples/opengl/legacy/pbuffers2/glwidget.cpp
+++ b/examples/opengl/legacy/pbuffers2/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/pbuffers2/glwidget.h b/examples/opengl/legacy/pbuffers2/glwidget.h
index 20dd796a48..d1c09dada8 100644
--- a/examples/opengl/legacy/pbuffers2/glwidget.h
+++ b/examples/opengl/legacy/pbuffers2/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/pbuffers2/main.cpp b/examples/opengl/legacy/pbuffers2/main.cpp
index 79fd88a3c8..6d2e8a9456 100644
--- a/examples/opengl/legacy/pbuffers2/main.cpp
+++ b/examples/opengl/legacy/pbuffers2/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/samplebuffers/glwidget.cpp b/examples/opengl/legacy/samplebuffers/glwidget.cpp
index 28abf3d6c0..138ca98e64 100644
--- a/examples/opengl/legacy/samplebuffers/glwidget.cpp
+++ b/examples/opengl/legacy/samplebuffers/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/samplebuffers/glwidget.h b/examples/opengl/legacy/samplebuffers/glwidget.h
index 494c5861df..998a5d098b 100644
--- a/examples/opengl/legacy/samplebuffers/glwidget.h
+++ b/examples/opengl/legacy/samplebuffers/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/samplebuffers/main.cpp b/examples/opengl/legacy/samplebuffers/main.cpp
index a1272af4db..c718729262 100644
--- a/examples/opengl/legacy/samplebuffers/main.cpp
+++ b/examples/opengl/legacy/samplebuffers/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/shared/qtlogo.cpp b/examples/opengl/legacy/shared/qtlogo.cpp
index 608f5b3f2b..efe3fb0201 100644
--- a/examples/opengl/legacy/shared/qtlogo.cpp
+++ b/examples/opengl/legacy/shared/qtlogo.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/legacy/shared/qtlogo.h b/examples/opengl/legacy/shared/qtlogo.h
index 5508372b01..562435daed 100644
--- a/examples/opengl/legacy/shared/qtlogo.h
+++ b/examples/opengl/legacy/shared/qtlogo.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/paintedwindow/main.cpp b/examples/opengl/paintedwindow/main.cpp
index b2e3cf796f..6d212361a9 100644
--- a/examples/opengl/paintedwindow/main.cpp
+++ b/examples/opengl/paintedwindow/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/paintedwindow/paintedwindow.cpp b/examples/opengl/paintedwindow/paintedwindow.cpp
index d44b6308b3..c67edb6f65 100644
--- a/examples/opengl/paintedwindow/paintedwindow.cpp
+++ b/examples/opengl/paintedwindow/paintedwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/paintedwindow/paintedwindow.h b/examples/opengl/paintedwindow/paintedwindow.h
index 140af6db4d..85179f9857 100644
--- a/examples/opengl/paintedwindow/paintedwindow.h
+++ b/examples/opengl/paintedwindow/paintedwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/qopenglwidget/bubble.cpp b/examples/opengl/qopenglwidget/bubble.cpp
index c78e26a1d4..b7b6826886 100644
--- a/examples/opengl/qopenglwidget/bubble.cpp
+++ b/examples/opengl/qopenglwidget/bubble.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/qopenglwidget/bubble.h b/examples/opengl/qopenglwidget/bubble.h
index ea33466ef7..c8e6cf181d 100644
--- a/examples/opengl/qopenglwidget/bubble.h
+++ b/examples/opengl/qopenglwidget/bubble.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/qopenglwidget/glwidget.cpp b/examples/opengl/qopenglwidget/glwidget.cpp
index d39e1992a7..f93e667615 100644
--- a/examples/opengl/qopenglwidget/glwidget.cpp
+++ b/examples/opengl/qopenglwidget/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
- ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
- ** Contact: http://www.qt-project.org/legal
+ ** Copyright (C) 2015 The Qt Company Ltd.
+ ** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
- ** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
- ** of its contributors may be used to endorse or promote products derived
+ ** * 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.
**
**
diff --git a/examples/opengl/qopenglwidget/glwidget.h b/examples/opengl/qopenglwidget/glwidget.h
index ba8317df4a..02a62916f7 100644
--- a/examples/opengl/qopenglwidget/glwidget.h
+++ b/examples/opengl/qopenglwidget/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/qopenglwidget/main.cpp b/examples/opengl/qopenglwidget/main.cpp
index a545c27249..848bed487d 100644
--- a/examples/opengl/qopenglwidget/main.cpp
+++ b/examples/opengl/qopenglwidget/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/qopenglwidget/mainwindow.cpp b/examples/opengl/qopenglwidget/mainwindow.cpp
index a3c8d5edcf..6cf1d5d6e2 100644
--- a/examples/opengl/qopenglwidget/mainwindow.cpp
+++ b/examples/opengl/qopenglwidget/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/qopenglwidget/mainwindow.h b/examples/opengl/qopenglwidget/mainwindow.h
index 353586c42c..f1b2c51e53 100644
--- a/examples/opengl/qopenglwidget/mainwindow.h
+++ b/examples/opengl/qopenglwidget/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/qopenglwindow/background.frag b/examples/opengl/qopenglwindow/background.frag
index 572c941f08..eecb6d3120 100644
--- a/examples/opengl/qopenglwindow/background.frag
+++ b/examples/opengl/qopenglwindow/background.frag
@@ -1,3 +1,6 @@
+#define M_PI 3.1415926535897932384626433832795
+#define SPEED 10000.0
+
uniform int currentTime;
uniform highp vec2 windowSize;
@@ -8,18 +11,20 @@ highp float noise(highp vec2 co)
highp float curvSpeed()
{
- return mod(float(currentTime), 1000000.0) / 500.0;
+ return (mod(float(currentTime), SPEED) / SPEED) * (2.0 * M_PI);
}
-highp float curv()
+highp float curv(int curvCount)
{
- return 1.0 - abs((gl_FragCoord.y / (windowSize.y / 10.0) - 5.0) - sin((gl_FragCoord.x / (windowSize.x/20.0)) - curvSpeed()));
+ highp float curv_y = 0.1 *(cos((gl_FragCoord.x / windowSize.x) * (float(curvCount * 2) * M_PI) - curvSpeed())) + 0.5;
+ highp float frag_y = gl_FragCoord.y / windowSize.y;
+ return 1.0 - abs(curv_y - frag_y);
}
void main()
{
highp float coordNoise = noise(gl_FragCoord.xy);
- highp float proximity = smoothstep(0.5, 1.0, (curv() + 1.0) * (coordNoise ));
+ highp float proximity = smoothstep(0.85, 1.0, (curv(6) + 1.0) * (coordNoise ));
highp vec3 color = vec3(coordNoise) * proximity;
gl_FragColor = vec4(color, 1.0);
}
diff --git a/examples/opengl/qopenglwindow/background_renderer.cpp b/examples/opengl/qopenglwindow/background_renderer.cpp
index 2c830ac13c..bf42ffff8a 100644
--- a/examples/opengl/qopenglwindow/background_renderer.cpp
+++ b/examples/opengl/qopenglwindow/background_renderer.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
@@ -75,8 +75,8 @@ FragmentToy::FragmentToy(const QString &fragmentSource, QObject *parent)
m_fragment_file_last_modified = info.lastModified();
m_fragment_file = fragmentSource;
#ifndef QT_NO_FILESYSTEMWATCHER
- m_watcher.addPath(info.canonicalFilePath());
- QObject::connect(&m_watcher, &QFileSystemWatcher::fileChanged, this, &FragmentToy::fileChanged);
+ m_watcher.addPath(info.canonicalPath());
+ QObject::connect(&m_watcher, &QFileSystemWatcher::directoryChanged, this, &FragmentToy::fileChanged);
#endif
}
}
@@ -94,7 +94,7 @@ void FragmentToy::draw(const QSize &windowSize)
if (!m_vao.isCreated())
m_vao.create();
- m_vao.bind();
+ QOpenGLVertexArrayObject::Binder binder(&m_vao);
if (!m_vertex_buffer.isCreated()) {
m_vertex_buffer.create();
@@ -115,7 +115,7 @@ void FragmentToy::draw(const QSize &windowSize)
}
}
- if (!m_fragment_shader) {
+ if (!m_fragment_shader && m_recompile_shaders) {
QByteArray data;
if (m_fragment_file.size()) {
QFile file(m_fragment_file);
@@ -160,6 +160,9 @@ void FragmentToy::draw(const QSize &windowSize)
}
+ if (!m_program->isLinked())
+ return;
+
m_program->bind();
m_vertex_buffer.bind();
@@ -167,15 +170,12 @@ void FragmentToy::draw(const QSize &windowSize)
m_program->enableAttributeArray("vertexCoord");
m_vertex_buffer.release();
- float radiens = (QTime::currentTime().msecsSinceStartOfDay() / 60) / (2 * M_PI);
m_program->setUniformValue("currentTime", (uint) QDateTime::currentDateTime().toMSecsSinceEpoch());
- m_program->setUniformValue("radiens", radiens);
m_program->setUniformValue("windowSize", windowSize);
QOpenGLContext::currentContext()->functions()->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
m_program->release();
- m_vao.release();
}
void FragmentToy::fileChanged(const QString &path)
diff --git a/examples/opengl/qopenglwindow/background_renderer.h b/examples/opengl/qopenglwindow/background_renderer.h
index 3759de478c..111d68977b 100644
--- a/examples/opengl/qopenglwindow/background_renderer.h
+++ b/examples/opengl/qopenglwindow/background_renderer.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/qopenglwindow/main.cpp b/examples/opengl/qopenglwindow/main.cpp
index bf95d09ecd..123bebbe2a 100644
--- a/examples/opengl/qopenglwindow/main.cpp
+++ b/examples/opengl/qopenglwindow/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
@@ -97,7 +97,7 @@ private:
// typical in pure QWindow-based applications.
OpenGLWindow::OpenGLWindow()
: QOpenGLWindow(QOpenGLWindow::NoPartialUpdate)
- , m_fragment_toy("background.frag")
+ , m_fragment_toy("./background.frag")
, m_text_layout("The triangle and this text is rendered with QPainter")
, m_animate(true)
{
diff --git a/examples/opengl/textures/glwidget.cpp b/examples/opengl/textures/glwidget.cpp
index 96c732f8a6..d01c8e6b1a 100644
--- a/examples/opengl/textures/glwidget.cpp
+++ b/examples/opengl/textures/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/textures/glwidget.h b/examples/opengl/textures/glwidget.h
index eb47266e64..6e40e85f6d 100644
--- a/examples/opengl/textures/glwidget.h
+++ b/examples/opengl/textures/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/textures/main.cpp b/examples/opengl/textures/main.cpp
index 30b0bfa607..7858fbd07d 100644
--- a/examples/opengl/textures/main.cpp
+++ b/examples/opengl/textures/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/textures/window.cpp b/examples/opengl/textures/window.cpp
index 8876de5602..e9ad8e2cc6 100644
--- a/examples/opengl/textures/window.cpp
+++ b/examples/opengl/textures/window.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/textures/window.h b/examples/opengl/textures/window.h
index 0b53387024..272cfb5d04 100644
--- a/examples/opengl/textures/window.h
+++ b/examples/opengl/textures/window.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/threadedqopenglwidget/glwidget.cpp b/examples/opengl/threadedqopenglwidget/glwidget.cpp
index ecf1287045..141851b90a 100644
--- a/examples/opengl/threadedqopenglwidget/glwidget.cpp
+++ b/examples/opengl/threadedqopenglwidget/glwidget.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/threadedqopenglwidget/glwidget.h b/examples/opengl/threadedqopenglwidget/glwidget.h
index c063e846dc..5d624bee0d 100644
--- a/examples/opengl/threadedqopenglwidget/glwidget.h
+++ b/examples/opengl/threadedqopenglwidget/glwidget.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/threadedqopenglwidget/main.cpp b/examples/opengl/threadedqopenglwidget/main.cpp
index 66ee4c2f7f..b75efe3ee2 100644
--- a/examples/opengl/threadedqopenglwidget/main.cpp
+++ b/examples/opengl/threadedqopenglwidget/main.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/threadedqopenglwidget/mainwindow.cpp b/examples/opengl/threadedqopenglwidget/mainwindow.cpp
index de866f5615..93f8015879 100644
--- a/examples/opengl/threadedqopenglwidget/mainwindow.cpp
+++ b/examples/opengl/threadedqopenglwidget/mainwindow.cpp
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**
diff --git a/examples/opengl/threadedqopenglwidget/mainwindow.h b/examples/opengl/threadedqopenglwidget/mainwindow.h
index 91f7580717..92edfa3fb1 100644
--- a/examples/opengl/threadedqopenglwidget/mainwindow.h
+++ b/examples/opengl/threadedqopenglwidget/mainwindow.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
**
** This file is part of the examples of the Qt Toolkit.
**
@@ -17,8 +17,8 @@
** notice, this list of conditions and the following disclaimer in
** the documentation and/or other materials provided with the
** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
+** * 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.
**
**