⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qglformat.3qt

📁 Linux下的基于X11的图形开发环境。
💻 3QT
📖 第 1 页 / 共 2 页
字号:
.PPSee also defaultFormat() and setOption()..SH "bool QGLFormat::accum () const"Returns TRUE if the accumulation buffer is enabled; otherwise returns FALSE. The accumulation buffer is disabled by default..PPSee also setAccum()..SH "bool QGLFormat::alpha () const"Returns TRUE if the alpha channel of the framebuffer is enabled; otherwise returns FALSE. The alpha channel is disabled by default..PPSee also setAlpha()..SH "QGLFormat QGLFormat::defaultFormat ()\fC [static]\fR"Returns the default QGLFormat for the application. All QGLWidgets that are created use this format unless another format is specified, e.g. when they are constructed..PPIf no special default format has been set using setDefaultFormat(), the default format is the same as that created with QGLFormat()..PPSee also setDefaultFormat()..SH "QGLFormat QGLFormat::defaultOverlayFormat ()\fC [static]\fR"Returns the default QGLFormat for overlay contexts..PPThe factory default overlay format is:.TPDouble buffer: Disabled..TPDepth buffer: Disabled..TPRGBA: Disabled (i.e., color index enabled)..TPAlpha channel: Disabled..TPAccumulator buffer: Disabled..TPStencil buffer: Disabled..TPStereo: Disabled..TPDirect rendering: Enabled..TPOverlay: Disabled..TPPlane: 1 (i.e., first overlay plane)..PPSee also setDefaultFormat()..SH "bool QGLFormat::depth () const"Returns TRUE if the depth buffer is enabled; otherwise returns FALSE. The depth buffer is enabled by default..PPSee also setDepth()..SH "bool QGLFormat::directRendering () const"Returns TRUE if direct rendering is enabled; otherwise returns FALSE..PPDirect rendering is enabled by default..PPSee also setDirectRendering()..SH "bool QGLFormat::doubleBuffer () const"Returns TRUE if double buffering is enabled; otherwise returns FALSE. Double buffering is enabled by default..PPSee also setDoubleBuffer()..SH "bool QGLFormat::hasOpenGL ()\fC [static]\fR"Returns TRUE if the window system has any OpenGL support; otherwise returns FALSE..PP\fBWarning:\fR This function must not be called until the QApplication object has been created..SH "bool QGLFormat::hasOpenGLOverlays ()\fC [static]\fR"Returns TRUE if the window system supports OpenGL overlays; otherwise returns FALSE..PP\fBWarning:\fR This function must not be called until the QApplication object has been created..SH "bool QGLFormat::hasOverlay () const"Returns TRUE if overlay plane is enabled; otherwise returns FALSE..PPOverlay is disabled by default..PPSee also setOverlay()..SH "int QGLFormat::plane () const"Returns the plane of this format. The default for normal formats is 0, which means the normal plane. The default for overlay formats is 1, which is the first overlay plane..PPSee also setPlane()..SH "bool QGLFormat::rgba () const"Returns TRUE if RGBA color mode is set. Returns FALSE if color index mode is set. The default color mode is RGBA..PPSee also setRgba()..SH "void QGLFormat::setAccum ( bool enable )"If \fIenable\fR is TRUE enables the accumulation buffer; otherwise disables the accumulation buffer..PPThe accumulation buffer is disabled by default..PPThe accumulation buffer is used to create blur effects and multiple exposures..PPSee also accum()..SH "void QGLFormat::setAlpha ( bool enable )"If \fIenable\fR is TRUE enables the alpha channel; otherwise disables the alpha channel..PPThe alpha buffer is disabled by default..PPThe alpha channel is typically used for implementing transparency or translucency. The A in RGBA specifies the transparency of a pixel..PPSee also alpha()..SH "void QGLFormat::setDefaultFormat ( const QGLFormat & f )\fC [static]\fR"Sets a new default QGLFormat for the application to \fIf\fR. For example, to set single buffering as the default instead of double buffering, your main() might contain code like this:.PP.nf.br    QApplication a(argc, argv);.br    QGLFormat f;.br    f.setDoubleBuffer( FALSE );.br    QGLFormat::setDefaultFormat( f );.br.fi.PPSee also defaultFormat()..SH "void QGLFormat::setDefaultOverlayFormat ( const QGLFormat & f )\fC [static]\fR"Sets a new default QGLFormat for overlay contexts to \fIf\fR. This format is used whenever a QGLWidget is created with a format that hasOverlay() enabled..PPFor example, to get a double buffered overlay context (if available), use code like this:.PP.nf.br    QGLFormat f = QGLFormat::defaultOverlayFormat();.br    f.setDoubleBuffer( TRUE );.br    QGLFormat::setDefaultOverlayFormat( f );.br.fi.PPAs usual, you can find out after widget creation whether the underlying OpenGL system was able to provide the requested specification:.PP.nf.br    // ...continued from above.br    MyGLWidget* myWidget = new MyGLWidget( QGLFormat( QGL::HasOverlay ), ... );.br    if ( myWidget->format().hasOverlay() ) {.br        // Yes, we got an overlay, let's check _its_ format:.br        QGLContext* olContext = myWidget->overlayContext();.br        if ( olContext->format().doubleBuffer() ).br            ; // yes, we got a double buffered overlay.br        else.br            ; // no, only single buffered overlays are available.br    }.br.fi.PPSee also defaultOverlayFormat()..SH "void QGLFormat::setDepth ( bool enable )"If \fIenable\fR is TRUE enables the depth buffer; otherwise disables the depth buffer..PPThe depth buffer is enabled by default..PPThe purpose of a depth buffer (or Z-buffering) is to remove hidden surfaces. Pixels are assigned Z values based on the distance to the viewer. A pixel with a high Z value is closer to the viewer than a pixel with a low Z value. This information is used to decide whether to draw a pixel or not..PPSee also depth()..SH "void QGLFormat::setDirectRendering ( bool enable )"If \fIenable\fR is TRUE enables direct rendering; otherwise disables direct rendering..PPDirect rendering is enabled by default..PPEnabling this option will make OpenGL bypass the underlying window system and render directly from hardware to the screen, if this is supported by the system..PPSee also directRendering()..SH "void QGLFormat::setDoubleBuffer ( bool enable )"If \fIenable\fR is TRUE sets double buffering; otherwise sets single buffering..PPDouble buffering is enabled by default..PPDouble buffering is a technique where graphics are rendered on an off-screen buffer and not directly to the screen. When the drawing has been completed, the program calls a swapBuffers() function to exchange the screen contents with the buffer. The result is flicker-free drawing and often better performance..PPSee also doubleBuffer(), QGLContext::swapBuffers(), and QGLWidget::swapBuffers()..SH "void QGLFormat::setOption ( FormatOption opt )"Sets the format option to \fIopt\fR..PPSee also testOption()..SH "void QGLFormat::setOverlay ( bool enable )"If \fIenable\fR is TRUE enables an overlay plane; otherwise disables the overlay plane..PPEnabling the overlay plane will cause QGLWidget to create an additional context in an overlay plane. See the QGLWidget documentation for further information..PPSee also hasOverlay()..SH "void QGLFormat::setPlane ( int plane )"Sets the requested plane to \fIplane\fR. 0 is the normal plane, 1 is the first overlay plane, 2 is the second overlay plane, etc.; -1, -2, etc. are underlay planes..PPNote that in contrast to other format specifications, the plane specifications will be matched exactly. This means that if you specify a plane that the underlying OpenGL system cannot provide, an invalid QGLWidget will be created..PPSee also plane()..SH "void QGLFormat::setRgba ( bool enable )"If \fIenable\fR is TRUE sets RGBA mode. If \fIenable\fR is FALSE sets color index mode..PPThe default color mode is RGBA..PPRGBA is the preferred mode for most OpenGL applications. In RGBA color mode you specify colors as red + green + blue + alpha quadruplets..PPIn color index mode you specify an index into a color lookup table..PPSee also rgba()..SH "void QGLFormat::setStencil ( bool enable )"If \fIenable\fR is TRUE enables the stencil buffer; otherwise disables the stencil buffer..PPThe stencil buffer is disabled by default..PPThe stencil buffer masks certain parts of the drawing area so that masked parts are not drawn on..PPSee also stencil()..SH "void QGLFormat::setStereo ( bool enable )"If \fIenable\fR is TRUE enables stereo buffering; otherwise disables stereo buffering..PPStereo buffering is disabled by default..PPStereo buffering provides extra color buffers to generate left-eye and right-eye images..PPSee also stereo()..SH "bool QGLFormat::stencil () const"Returns TRUE if the stencil buffer is enabled; otherwise returns FALSE. The stencil buffer is disabled by default..PPSee also setStencil()..SH "bool QGLFormat::stereo () const"Returns TRUE if stereo buffering is enabled; otherwise returns FALSE. Stereo buffering is disabled by default..PPSee also setStereo()..SH "bool QGLFormat::testOption ( FormatOption opt ) const"Returns TRUE if format option \fIopt\fR is set; otherwise returns FALSE..PPSee also setOption()..SH "SEE ALSO".BR http://doc.trolltech.com/qglformat.html.BR http://www.trolltech.com/faq/tech.html.SH COPYRIGHTCopyright 1992-2001 Trolltech AS, http://www.trolltech.com.  See thelicense file included in the distribution for a complete licensestatement..SH AUTHORGenerated automatically from the source code..SH BUGSIf you find a bug in Qt, please report it as described in.BR http://doc.trolltech.com/bughowto.html .Good bug reports help us to help you. Thank you..PThe definitive Qt documentation is provided in HTML format; it islocated at $QTDIR/doc/html and can be read using Qt Assistant or witha web browser. This man page is provided as a convenience for thoseusers who prefer man pages, although this format is not officiallysupported by Trolltech. .PIf you find errors in this manual page, please report them to.BR qt-bugs@trolltech.com .Please include the name of the manual page (qglformat.3qt) and the Qtversion (3.1.1).

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -