QtOpenGL 模块

The QtOpenGL 模块提供类使之易于使用 OpenGL 在 Qt 应用程序中。 更多...

名称空间

QGL Specifies miscellaneous identifiers used in the Qt OpenGL module

QGLBuffer Functions for creating and managing GL buffer objects
QGLContext Encapsulates an OpenGL rendering context
QGLFormat Specifies the display format of an OpenGL rendering context
QGLFramebufferObject 封装 OpenGL 帧缓冲对象
QGLFramebufferObjectFormat 指定 OpenGL 帧缓冲对象的格式
QGLFunctions Cross-platform access to the OpenGL/ES 2.0 API
QGLPixelBuffer Encapsulates an OpenGL pbuffer
QGLShader 允许编译 OpenGL 着色器
QGLShaderProgram 允许链接和使用 OpenGL 着色器程序
QGLWidget 用于渲染 OpenGL 图形的 Widget

详细描述

OpenGL is a standard API for rendering 3D graphics. OpenGL only deals with 3D rendering and provides little or no support for GUI programming issues. The user interface for an OpenGL application must be created with another toolkit, such as Motif on the X platform, Microsoft Foundation Classes (MFC) under Windows, or Qt on both platforms.

注意: OpenGL 是 Silicon (硅谷) 图形公司在美国及其它国家的商标。

Qt OpenGL module makes it easy to use OpenGL in Qt applications. It provides an OpenGL widget class that can be used just like any other Qt widget, except that it opens an OpenGL display buffer where you can use the OpenGL API to render the contents.

要包括模块类定义,使用以下指令:

#include <QtOpenGL>
					

要链接到模块,添加此行到 qmake .pro 文件:

QT += opengl
					

Qt OpenGL module is implemented as a platform-independent Qt/C++ wrapper around the platform-dependent GLX (version 1.3 or later), WGL, or AGL C APIs. Although the basic functionality provided is very similar to Mark Kilgard's GLUT library, applications using the Qt OpenGL module can take advantage of the whole Qt API for non- OpenGL -specific GUI functionality.

The QtOpenGL module is available on Windows, X11 and Mac OS X. Qt for Embedded Linux and OpenGL supports OpenGL ES ( OpenGL for Embedded Systems).

注意: To be able to use the OpenGL API in Qt for Embedded Linux , it must be integrated with the Q Window System (QWS). See the Qt for Embedded Linux and OpenGL 文档编制了解细节。