summaryrefslogtreecommitdiffstats
path: root/examples/opengl
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-06-30 22:59:21 +0200
committerLiang Qi <liang.qi@qt.io>2018-07-02 11:23:45 +0200
commite3ed2281c0c891cf3b15c95f9f7cdae42e9f233a (patch)
treeaae8da6ce616eae02b69fb1fcdcb4383c8fe6811 /examples/opengl
parent3be141d5bc199080b524d8f6f5ce514e8f74d23a (diff)
parente75e4b39b78ba05ea2cd45dc96acf99fc89c5915 (diff)
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: MÃ¥rten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
Diffstat (limited to 'examples/opengl')
-rw-r--r--examples/opengl/hellogles3/doc/images/hellogles3-example.pngbin0 -> 61792 bytes
-rw-r--r--examples/opengl/hellogles3/doc/src/hellogles3.qdoc46
-rw-r--r--examples/opengl/hellogles3/glwindow.cpp3
-rw-r--r--examples/opengl/hellogles3/qtlogo.pngbin5402 -> 2318 bytes
4 files changed, 48 insertions, 1 deletions
diff --git a/examples/opengl/hellogles3/doc/images/hellogles3-example.png b/examples/opengl/hellogles3/doc/images/hellogles3-example.png
new file mode 100644
index 0000000000..e089b9470a
--- /dev/null
+++ b/examples/opengl/hellogles3/doc/images/hellogles3-example.png
Binary files differ
diff --git a/examples/opengl/hellogles3/doc/src/hellogles3.qdoc b/examples/opengl/hellogles3/doc/src/hellogles3.qdoc
new file mode 100644
index 0000000000..fbe071f143
--- /dev/null
+++ b/examples/opengl/hellogles3/doc/src/hellogles3.qdoc
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** 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
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example hellogles3
+ \title Hello GLES3 Example
+ \ingroup examples-widgets-opengl
+
+ \brief The Hello GLES3 example demonstrates easy, cross-platform usage of
+ OpenGL ES 3.0 functions via QOpenGLExtraFunctions in an application that
+ works identically on desktop platforms with OpenGL 3.3 and mobile/embedded
+ devices with OpenGL ES 3.0.
+
+ The code is always the same, with the exception of two places:
+ \list
+ \li The OpenGL context creation has to have a sufficiently high version
+ number for the features that are in use.
+ \li The shader code's version directive is different.
+ \endlist
+
+ \image hellogles3-example.png
+*/
diff --git a/examples/opengl/hellogles3/glwindow.cpp b/examples/opengl/hellogles3/glwindow.cpp
index 13cbc41ce8..9458b74810 100644
--- a/examples/opengl/hellogles3/glwindow.cpp
+++ b/examples/opengl/hellogles3/glwindow.cpp
@@ -243,7 +243,8 @@ void GLWindow::initializeGL()
f->glEnableVertexAttribArray(0);
f->glEnableVertexAttribArray(1);
f->glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), 0);
- f->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), reinterpret_cast<void *>(3 * sizeof(GLfloat)));
+ f->glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat),
+ reinterpret_cast<void *>(3 * sizeof(GLfloat)));
m_vbo->release();
f->glEnable(GL_DEPTH_TEST);
diff --git a/examples/opengl/hellogles3/qtlogo.png b/examples/opengl/hellogles3/qtlogo.png
index 868fcea860..9cb2e01d38 100644
--- a/examples/opengl/hellogles3/qtlogo.png
+++ b/examples/opengl/hellogles3/qtlogo.png
Binary files differ