Qt OpenGL Examples

These examples describe how to use the Qt OpenGL 模块。

Qt provides support for integration with OpenGL implementations, 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.

2D 描绘范例

The 2D Painting example shows how QPainter and QOpenGLWidget can be used together to display accelerated 2D graphics on supported hardware.

立方体 OpenGL ES 2.0 范例

Shows how to manually rotate a textured 3D cube with user input.

Hello GL2 范例

The Hello GL2 example demonstrates the basic use of the OpenGL-related classes provided with Qt.

Hello GLES3 范例

Demonstrates OpenGL ES 3.0 functions via QOpenGLExtraFunctions.

OpenGL 窗口范例

This example shows how to create a minimal QWindow based application for the purpose of using OpenGL.

QOpenGLWidget Stereoscopic Rendering Example

This example shows how to create a minimal QOpenGLWidget based application with stereoscopic rendering support.

纹理范例

The Textures example demonstrates the use of Qt's image classes as textures in applications that use both OpenGL and Qt to display graphics.