summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellogles3
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup QtOpenGL examplesChristian Ehrlicher2019-09-302-39/+19
| | | | | | | | | | | Cleanup the OpenGL examples - use nullptr (clang-tidy) - use member-initialization - avoid redundant checks for != nullptr when deleting a pointer Change-Id: I3e4702690ed79e71c3e952d51ceef83b907b45b7 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* hellogles3: Request core profile contextLaszlo Agocs2019-05-111-3/+3
| | | | | | | | | | | | | ...instead of compatibility, in order to play nice with systems that have no compatibility profile support (macOS). Instancing needs OpenGL 3.x so sticking with 2.x contexts is not an option. The example looks fully compatible with core profile so its functionality should not change. Change-Id: If0d554a6208973aa8a4fb86757e246d170cd0e71 Fixes: QTBUG-75680 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Doc: Add Hello GLES3 examplePaul Wicking2018-06-264-1/+48
| | | | | | Task-number: QTBUG-67109 Change-Id: I55135264a63b78502b300de723a25b3f363af58b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* hellogles3 example: Fix start-up crash when using dynamic GLFriedemann Kleint2018-01-261-2/+2
| | | | | | | | | Move the instantiation of QGuiApplication to the top since it is required by QOpenGLContext::openGLModuleType(). Task-number: QTBUG-55671 Change-Id: I506cee193fe2ba48400851588a8ef079848bc2f4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Unify license header usage.Jani Heikkinen2016-03-293-9/+39
| | | | | | | | | 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>
* Port examples/opengl to new connection syntax.Friedemann Kleint2015-09-021-1/+1
| | | | | Change-Id: I486a4a2326bf57ec5ea08bccdcef79c3e5553db5 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Compile in namespaced buildsSean Harmer2015-08-311-0/+4
| | | | | Change-Id: I2894fbadec50286c0831bf381d149b54ade9182d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Make the gles3 example more impressivePaul Olav Tvete2015-07-246-144/+84
| | | | | | | | | | 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>
* Expose GLES 3.0 and 3.1 functionsLaszlo Agocs2015-07-238-0/+533
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>