qt5base-lts/examples
Laszlo Agocs 4535c7911d Expose GLES 3.0 and 3.1 functions
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>
2015-07-23 07:59:07 +00:00
..
aggregate install a sane top-level examples.pro file 2012-12-11 13:37:57 +01:00
corelib fix usage of wince scope 2015-06-05 10:29:10 +00:00
dbus Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
embedded examples: migrate to QString::asprintf 2015-02-12 19:40:09 +00:00
gui Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
network fix usage of wince scope 2015-06-05 10:29:10 +00:00
opengl Expose GLES 3.0 and 3.1 functions 2015-07-23 07:59:07 +00:00
qmake Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
qpa Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
qtconcurrent QtConcurrent example: remove unneeded explicit template type 2015-07-17 14:29:42 +00:00
qtestlib Updated BSD licensed file headers 2015-02-15 07:41:17 +00:00
sql Merge remote-tracking branch 'origin/5.5' into dev 2015-07-01 11:05:26 +02:00
touch fingerpaint example: Use the maximum diameter for the touch spot by default 2015-05-23 11:28:00 +00:00
webkit/webkit-guide Remove exec bits from files that should not be executable 2015-06-07 22:50:19 +00:00
widgets Port examples/widgets/dialogs to new connection syntax. 2015-07-22 04:12:45 +00:00
xml Merge remote-tracking branch 'origin/5.5' into dev 2015-07-01 11:05:26 +02:00
examples.pro Move Qt Core examples under a common subdirectory 2014-10-17 14:57:13 +02:00
README Remove more references to demos. 2011-07-08 15:36:26 +02:00

Qt is supplied with a number of example applications that have been
written to provide developers with examples of the Qt API in use,
highlight good programming practice, and showcase features found in each of
Qt's core technologies.


Documentation for examples can be found in the Examples section
of the Qt documentation.