OpenGL Examples from the Qt OpenGL module
These examples describe how to use the Qt OpenGL Module. For new code, please use the OpenGL classes in the Qt GUI Module.
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.
Alphabetical listing of Qt Examples | |
The 2D Painting example shows how QPainter and QGLWidget can be used together to display accelerated 2D graphics on supported hardware. | |
The Cube OpenGL ES 2.0 example shows how to write mouse rotateable textured 3D cube using OpenGL ES 2.0 with Qt. It shows how to handle polygon geometries efficiently and how to write simple vertex and fragment shader for programmable graphics pipeline. In addition it shows how to use quaternions for representing 3D object orientation. | |
The Framebuffer Object 2 example demonstrates how to use the QGLFramebufferObject class to render into an off-screen buffer and use the contents as a texture in a QGLWidget. | |
The Grabber examples shows how to retrieve the contents of an OpenGL framebuffer. | |
The Hello GL example demonstrates the basic use of the OpenGL-related classes provided with Qt. | |
The Overpainting example shows how QPainter can be used to overpaint a scene rendered using OpenGL in a QGLWidget. | |
The Pixel Buffers example demonstrates how to use the QGLPixelBuffer class to render into an off-screen buffer and use the contents as a dynamic texture in a QGLWidget. | |
The Pixel Buffers 2 example demonstrates how to use the QGLPixelBuffer class to render into an off-screen buffer and use the contents as a dynamic texture in a QGLWidget. | |
The Sample Buffers example demonstrates how to use and enable sample buffers in a QGLWidget. | |
The Textures example demonstrates the use of Qt's image classes as textures in applications that use both OpenGL and Qt to display graphics. |