没有合适的资源?快使用搜索试试~ 我知道了~
首页Qt 4.7 opengl 模块文档
资源详情
资源评论
资源推荐
QtOpenGL Module
The QtOpenGL module offers classes that make it easy to use OpenGL in Qt applications. More...
Namespaces
QGL Specifies miscellaneous identifiers used in the Qt OpenGL module
Classes
QGLBuffer Functions for creating and managing GL buffer objects
QGLColormap Used for installing custom colormaps into a QGLWidget
QGLContext Encapsulates an OpenGL rendering context
QGLFormat Specifies the display format of an OpenGL rendering context
QGLFramebufferObject Encapsulates an OpenGL framebuffer object
QGLFramebufferObjectFormat Specifies the format of an OpenGL framebuffer object
QGLPixelBuffer Encapsulates an OpenGL pbuffer
QGLShader
Allows OpenGL shaders to be compiled
QGLShaderProgram Allows OpenGL shader programs to be linked and used
QGLWidget
Widget for rendering OpenGL graphics
QWSGLWindowSurface
The drawing area for top-level windows with Qt for Embedded Linux
on EGL/OpenGL ES. It also provides the drawing area for
QGLWidgets whether they are top-level windows or children of
another QWidget
Detailed Descriptio
n
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.
Note: OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries.
The 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.
To include the definitions of the module's classes, use the following directive:
#include <QtOpenGL>
To link against the module, add this line to your qmake .pro file:
QT += opengl
The 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). Note: 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 documentation for details.
QGL Namespace
The QGL namespace specifies miscellaneous identifiers used in the Qt OpenGL module. More...
#include <QGL>
Types
enum
FormatOption { DoubleBuffer, DepthBuffer, Rgba, AlphaChannel, ...,
NoDeprecatedFunctions }
flags FormatOptions
Functions
void setPreferredPaintEngine ( QPaintEngine::Type engineType )
Detailed Description
The QGL namespace specifies miscellaneous identifiers used in the Qt OpenGL module.
Type Documentation
enum QGL::FormatOption
flags QGL::FormatOptions
This enum specifies the format options that can be used to configure an OpenGL context. These are set
using QGLFormat::setOption().
Constant Value Description
QGL::DoubleBuffer 0x0001 Specifies the use of double buffering.
QGL::DepthBuffer 0x0002 Enables the use of a depth buffer.
QGL::Rgba 0x0004
Specifies that the context should use
RGBA as its pixel format.
QGL::AlphaChannel 0x0008 Enables the use of an alpha channel.
QGL::AccumBuffer 0x0010
Enables the use of an accumulation
buffer.
QGL::StencilBuffer 0x0020 Enables the use of a stencil buffer.
QGL::StereoBuffers 0x0040
Enables the use of a stereo buffers for
use with visualization hardware.
QGL::DirectRendering 0x0080
Specifies that the context is used for
direct rendering to a display.
QGL::HasOverlay 0x0100 Enables the use of an overlay.
QGL::SampleBuffers 0x0200 Enables the use of sample buffers.
QGL::DeprecatedFunctions 0x0400 Enables the use of deprecated
functionality for OpenGL 3.x contexts.
A context with deprecated functionality
enabled is called a full context in the
OpenGL specification.
QGL::SingleBuffer DoubleBuffer<<16
Specifies the use of a single buffer, as
opposed to double buffers.
QGL::NoDepthBuffer DepthBuffer<<16 Disables the use of a depth buffer.
QGL::ColorIndex Rgba<<16
Specifies that the context should use a
color index as its pixel format.
QGL::NoAlphaChannel AlphaChannel<<16 Disables the use of an alpha channel.
QGL::NoAccumBuffer AccumBuffer<<16
Disables the use of an accumulation
buffer.
QGL::NoStencilBuffer StencilBuffer<<16 Disables the use of a stencil buffer.
QGL::NoStereoBuffers StereoBuffers<<16 Disables the use of stereo buffers.
QGL::IndirectRendering DirectRendering<<16
Specifies that the context is used for
indirect rendering to a buffer.
QGL::NoOverlay HasOverlay<<16 Disables the use of an overlay.
QGL::NoSampleBuffers SampleBuffers<<16 Disables the use of sample buffers.
QGL::NoDeprecatedFunctions DeprecatedFunctions<<16
Disables the use of deprecated
functionality for OpenGL 3.x contexts.
A context with deprecated functionality
disabled is called a forward compatible
context in the OpenGL specification.
The FormatOptions type is a typedef for QFlags<FormatOption>. It stores an OR combination of
FormatOption values.
See also Sample Buffers Example.
Function Documentation
void QGL::setPreferredPaintEngine ( QPaintEngine::Type engineType )
Sets the preferred OpenGL paint engine that is used to draw onto QGLWidget, QGLPixelBuffer and
QGLFramebufferObject targets with QPainter in Qt.
The engineType parameter specifies which of the GL engines to use. Only QPaintEngine::OpenGL
and QPaintEngine::OpenGL2 are valid parameters to this function. All other values are ignored.
By default, the
QPaintEngine::OpenGL2 engine is used if GL/GLES version 2.0 is available,
otherwise QPaintEngine::OpenGL is used.
Warning: This function must be called before the QApplication constructor is called.
This function was introduced in Qt 4.6.
QGLBuffer Class Reference
The QGLBuffer class provides functions for creating and managing GL buffer objects. More...
#include <QGLBuffer>
This class was introduced in Qt 4.7.
• List of all members, including inherited members
Public Types
enum Access { ReadOnly, WriteOnly, ReadWrite }
enum Type { VertexBuffer, IndexBuffer, PixelPackBuffer, PixelUnpackBuffer }
enum UsagePattern { StreamDraw, StreamRead, StreamCopy, StaticDraw, ..., DynamicCopy }
Public Functions
QGLBuffer ()
QGLBuffer ( QGLBuffer::Type type )
QGLBuffer ( const QGLBuffer & other )
~QGLBuffer ()
void allocate ( const void * data, int count )
void allocate ( int count )
bool bind ()
GLuint bufferId () const
bool create ()
void destroy ()
bool isCreated () const
void * map ( QGLBuffer::Access access )
bool read ( int offset, void * data, int count )
void release ()
void setUsagePattern ( QGLBuffer::UsagePattern value )
int size () const
QGLBuffer::Type type () const
bool unmap ()
QGLBuffer::UsagePattern usagePattern () const
void write ( int offset, const void * data, int count )
QGLBuffer & operator= ( const QGLBuffer & other )
Static Public Members
void release ( QGLBuffer::Type type )
剩余107页未读,继续阅读
elerao
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- RTL8188FU-Linux-v5.7.4.2-36687.20200602.tar(20765).gz
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论2