This patch fixes the example that contained problems showing up
with mesa/nouveau drivers.
Change-Id: Ic90f6028e394138781f00bcc00c145c56134f441
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
For examples and documentation, use new BSD license text that
includes the commercial licenses.
Change-Id: I1cd74bd8e9c8f2746d8702df00780ee100cbebac
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Update the legacy grabber example to use the new QRegularExpression
class in place of the deprecated QRegExp.
Change-Id: I1d1871b7e82cdb214fdd8ad55a606d5e7682fab1
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
We can use QOverload since Qt 5.7 (it depends on Q_COMPILER_VARIADIC_TEMPLATES
which is required since Qt 5.7).
Use it in the examples to show the best practice.
qOverload currently can't be used because it requires c++14.
Change-Id: I94a3c0db9d551fe169fa3d19c07ec0b329d5946c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
OpenGL ES 3.1 introduces compute shaders. This patch enables them also
in QOpenGLShader/QOpenGLShaderProgram.
A GL/GLES example using QOpenGLShaderProgram for compute shaders is also
included.
Change-Id: I3951a302d7c2b096548f829b9b4578b5a525c453
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Use the new qtConfig macro in all pro/pri files.
This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.
Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Conflicts:
qmake/library/qmakebuiltins.cpp
qmake/library/qmakeevaluator.cpp
qmake/library/qmakeevaluator.h
qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
changed the survivor
src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.
src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.
src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.
src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.
tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.
tests/auto/testlib/selftests/expected_cmptest.lightxml
tests/auto/testlib/selftests/expected_cmptest.teamcity
tests/auto/testlib/selftests/expected_cmptest.txt
tests/auto/testlib/selftests/expected_cmptest.xml
tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.
There was no git-conflict in
src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them. Put FixedColumnMatrix<>::removeRow(int)
back for its new user.
Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
... instead of creating a QDateTime object.
Change-Id: Ib57b52598e2f452985e9fffd145a36911de4fa9a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Examples should demonstrate best practice, and we can use the keyword
directly nowadays.
Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
while they are not built, their sources should be installed as long we
don't delete them completely.
Change-Id: I5e628e96cc9715520cb6e5aadb2cae61d1d03a4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Add command line options to be able to set the QCoreApplication attributes
that influence Open GL context creation and add a status label at the
bottom that displays it besides the QT_OPENGL environment variable.
Task-number: QTBUG-52693
Change-Id: Id9793292596e0feb3da5220fde2e5b2e495f87ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Update files using old header.LGPL3 to header.LGPL
Update files using old FDL template to use new one
Update files using old BSD template to use new one
Change-Id: I36a78272516f9953d02956522f285b40adfc8915
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The glColorMask call was troublesome. In addition, the Qt::WA_TranslucentBackground
was misinterpreted and recommended misleadingly in the documentation. The hellogl2
example's --transparent argument was disfunctional in practice.
Replace glColorMask with glBlendFuncSeparate. The hellogl2 example and the docs are
now corrected wrt enabling semi-transparency in a QOpenGLWidget that is not a top-level
(which is the most common case).
Task-number: QTBUG-47276
Change-Id: I6f40e732d455f5efcf158649ac9a52ff9f240e85
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Add some extra rotations and offsets, to show off the power of
what you can do with a single draw call. Also use QGLWindow instead
of QGLWidget. This improves performance from 23 FPS to 30 FPS on a
4k monitor with integrated Intel graphics.
Change-Id: Iedac1c14cc6057959aa15faaacdf29da91f36ab1
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Using the approach we already do for some GLES 3.0 functions we can provide a cross-platform,
cross-GL-GLES wrapper for ES 3.0 and 3.1 functions too.
Applications only have to take extra care about the version requests (context version
and version directives in shader code), the rest of their code can stay the same across
desktop/mobile/embedded, even when ES 3 functions are used.
The new functions are placed to a new subclass which is placed between QOpenGLFunctions
and the internal QOpenGLExtensions. This is necessary because, unlike with QOpenGLFunctions,
there is no guarantee that these functions are always available in all configurations.
When running on desktop OpenGL, we resolve as usual. If the OpenGL version contains the
function in question, either in core or as an extension, it will all just work. This is
handy because it does not rely on 4.x extensions like GL_ARB_ESx_compatibility, and so
ES 3.0 functions will be functional on OpenGL 3.x systems too by just setting a 3.x version
number in the QSurfaceFormat.
We will no longer qFatal on broken systems where the driver returns a 3.0 or 3.1 context without
the corresponding functions present. Instead, we show a warning and gracefully fall back to
resolving as usual, via eglGetProcAddress or similar. For functions that are available in ES2 as
an extension this may just work fine.
Added also an example that runs identically both with OpenGL and OpenGL ES 3 and utilizes some
ES 3.0 features like instanced drawing.
[ChangeLog] Added QOpenGLExtraFunctions providing OpenGL ES 3.0 and 3.1 function wrappers in
a cross-platform manner.
Task-number: QTBUG-46161
Change-Id: I9f929eb61946c35c415b178c4d6ab2c1c958684e
Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
The Hello GL2 Example was using the older Signal/Slot syntax that made
use of the macros `SIGNAL()` and `SLOT()`. I changed it to the newer
one.
Change-Id: I8e55015383847a04b07f751fe9fc94b81956a896
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Introduce support for the widgets' clipRect(). Right now render-to-texture widgets
in scroll areas placed close to each other result in broken (non-existent) clipping.
Similarly, stack-on-top widgets fail to clip when placed inside a scroll area.
This is now corrected and the qopenglwidget example is enhanced to utilize a scroll
area.
Task-number: QTBUG-45860
Change-Id: I859a63d61a50d64ba9e87244f83c5969dce12337
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Add dynamic GL and remove warning about ANGLE since that
package no longer exists.
Task-number: QTBUG-46103
Change-Id: Icf93d1105434395a3c9ad61bb8c921fcedfc7137
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Fix Library not loaded/image not found error on application
startup.
With @rpath enabled (commit 6e18f57a) qmake now requires
a correct target.path in order to emit correct -rpath @loader_path
linker directives.
Change-Id: Ia32b038ad2d64819477be5cd9d1ed36768e2251b
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.
Outdated header.LGPL removed (use header.LGPL21 instead)
Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)
Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination
Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
Also make the fragment shader a bit simpler
Change-Id: Ie50940da0a4f896504c9f5962cdb6c455983302f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
This patch replaces the old Qt logo with the new, flatter one.
The PNGs were optimized via: optipng -o7 -strip "all"
Task-number: QTBUG-41685
Change-Id: I51983a45144373bf7aee31a32990ecbb2582f488
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Platforms like eglfs allow a single window per screen. Thus the behavior of
--multiple is not suitable since it tries to open multiple windows on the
primary screen. Instead, introduce --multiscreen.
Add also --timeout to quit the app after 10 seconds. This is essential on
platforms that do not have windows with decorations that can be used to
close windows.
With eglfs' kms/drm hooks, starting with --multiscreen will now show a
rotating logo on all connected displays, with some random background color.
Change-Id: I53f2651f05620e752c289038a9b3ff4508273173
Reviewed-by: Louai Al-Khanji <louai.al-khanji@digia.com>
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
Retrieve vendor/renderer name similar to context info
and exclude renderers that do not support threaded
Open GL (ANGLE/noveau).
Change-Id: I690c2fc277538bf28bf1f6032c2e017ede15e434
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>