qt5base-lts/examples/opengl
Laszlo Agocs 5ebb9a8bf3 Tune textures example to work with wasm and update docs
Old examples inherited from Qt 4 tend to set some state, such as
enabling the depth test or culling, in initializeGL(). Newer examples
tend not to do this; they rather set the necessary state in paintGL().

This mattered little (or not at all) in the past, but with WebAssembly
and WebGL there are limitations in the GL context management in the
wasm platform plugin. Under certain conditions, esp. when
QOffscreenSurface is involved, it looks like the same native context
gets reused, which means there is a chance of unexpected changes to
the current state between calls to initializeGL() and paintGL(). (and
also between paintGL() calls) See QWasmOpenGLContext for details.

Update the textures example the same way we did for the cube one.

Add a note to the QOpenGLWidget docs about this problem.

Task-number: QTBUG-111304
Pick-to: 6.5 6.4
Change-Id: I29d2b2cdeb07bcecc5dc915d79c12b4323ca9ab3
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Inho Lee <inho.lee@qt.io>
2023-04-25 18:10:44 +02:00
..
2dpainting Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
contextinfo Fix ContextInfo example crashing on Android 2023-01-31 20:52:40 +02:00
cube cube example: always set required state in paintGL 2023-04-20 14:01:22 +02:00
doc Move hellogles3 docs to where the rest of these files live 2023-03-23 15:13:03 +01:00
hellogl2 Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
hellogles3 Move hellogles3 docs to where the rest of these files live 2023-03-23 15:13:03 +01:00
openglwindow Examples: Add missing include guards 2023-02-01 18:12:36 +00:00
qopenglwidget Examples: Use PRIVATE CMake linkage 2022-11-30 14:48:50 +01:00
stereoqopenglwidget Add support for stereoscopic content in QOpenGLWidget 2022-11-28 19:12:27 +01:00
textures Tune textures example to work with wasm and update docs 2023-04-25 18:10:44 +02:00
CMakeLists.txt Remove erroneous widget dependency for hellogles3 2023-03-23 15:13:03 +01:00
opengl.pro Remove erroneous widget dependency for hellogles3 2023-03-23 15:13:03 +01:00
README Remove references to demos from docs. 2011-07-05 19:57:54 +02:00

Qt provides support for integration with OpenGL implementations on all
platforms, giving developers the opportunity to display hardware accelerated
3D graphics alongside a more conventional user interface.

These examples demonstrate the basic techniques used to take advantage of
OpenGL in Qt applications.


Documentation for these examples can be found via the Examples
link in the main Qt documentation.