QOpenGLExtraFunctions in an application that works identically on desktop platforms with OpenGL 3.3 and mobile/embedded devices with OpenGL ES 3.0.">

- Qt 6.5
- Qt OpenGL
- OpenGL Examples from the Qt OpenGL module
- Hello GLES3 Example
- Qt 6.5.1 Reference Documentation

# Hello GLES3 Example

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:

- The OpenGL context creation has to have a sufficiently high version number for the features that are in use.
- The shader code's version directive is different.

This example has no QWidget dependencies. Instead, it uses QOpenGLWindow, a convenience subclass of QWindow that allows easy implementation of windows that contain OpenGL-rendered content. In this sense it complements the OpenGL Window Example, which shows the implementation of an OpenGL-based QWindow without using the convenience subclass.

Example project @ code.qt.io