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

📄 qglcontext.html

📁 QT 下载资料仅供参考
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<p> <p>See also <a href="#chooseContext">chooseContext</a>(), <a href="#format">format</a>() and <a href="#isValid">isValid</a>().<h3 class=fn>const&nbsp;<a href="qglcontext.html">QGLContext</a>&nbsp;* <a name="currentContext"></a>QGLContext::currentContext ()<tt> [static]</tt></h3><p> Returns the current context, i.e. the context to which any OpenGLcommands will currently be directed. Returns 0 if no context iscurrent.<p> <p>See also <a href="#makeCurrent">makeCurrent</a>().<h3 class=fn><a href="qpaintdevice.html">QPaintDevice</a>&nbsp;* <a name="device"></a>QGLContext::device () const</h3><p> Returns the paint device set for this context.<p> <p>See also <a href="#QGLContext">QGLContext::QGLContext</a>().<h3 class=fn>bool <a name="deviceIsPixmap"></a>QGLContext::deviceIsPixmap () const<tt> [protected]</tt></h3><p> Returns TRUE if the paint device of this context is a pixmap;otherwise returns FALSE.<h3 class=fn>void <a name="doneCurrent"></a>QGLContext::doneCurrent ()<tt> [virtual protected]</tt></h3><p> Makes no GL context the current context. Normally, you do not needto call this function; QGLContext calls it as necessary.<h3 class=fn><a href="qglformat.html">QGLFormat</a> <a name="format"></a>QGLContext::format () const</h3>Returns the frame buffer format that was obtained (this may be asubset of what was requested).<p> <p>See also <a href="#requestedFormat">requestedFormat</a>().<h3 class=fn>bool <a name="initialized"></a>QGLContext::initialized () const<tt> [protected]</tt></h3><p> Returns TRUE if this context has been initialized, i.e. if<a href="qglwidget.html#initializeGL">QGLWidget::initializeGL</a>() has been performed on it; otherwise returnsFALSE.<p> <p>See also <a href="#setInitialized">setInitialized</a>().<h3 class=fn>bool <a name="isSharing"></a>QGLContext::isSharing () const</h3><p> Returns TRUE if display list sharing with another context wasrequested in the <a href="#create">create</a>() call and the GL system was able tofulfill this request; otherwise returns FALSE. Note that display listsharing might not be supported between contexts with differentformats.<h3 class=fn>bool <a name="isValid"></a>QGLContext::isValid () const</h3>Returns TRUE if a GL rendering context has been successfully created;otherwise returns FALSE.<h3 class=fn>void <a name="makeCurrent"></a>QGLContext::makeCurrent ()<tt> [virtual]</tt></h3><p> Makes this context the current OpenGL rendering context.  All GLfunctions you call operate on this context until another context ismade current.<p> Note that under special circumstances the underlying call may fail,in which case this will not be reported back to the caller. However,a message is printed to stderr stating this.<h3 class=fn><a href="qcolor.html">QColor</a> <a name="overlayTransparentColor"></a>QGLContext::overlayTransparentColor () const</h3><p> If this context is a valid context in an overlay plane, returns theplane's transparent color. Otherwise returns an <a href="qcolor.html#isValid">invalid</a> color.<p> The returned color's <a href="qcolor.html#pixel">pixel</a> value isthe index of the transparent color in the colormap of the overlayplane. (Naturally, the color's RGB values are meaningless.)<p> The returned <a href="qcolor.html">QColor</a> object will generally work as expected only whenpassed as the argument to <a href="qglwidget.html#qglColor">QGLWidget::qglColor</a>() or<a href="qglwidget.html#qglClearColor">QGLWidget::qglClearColor</a>(). Under certain circumstances it can alsobe used to draw transparent graphics with a <a href="qpainter.html">QPainter</a>. See theexamples/opengl/overlay_x11 example for details.<h3 class=fn><a href="qglformat.html">QGLFormat</a> <a name="requestedFormat"></a>QGLContext::requestedFormat () const</h3><p> Returns the frame buffer format that was originally requested in theconstructor or <a href="#setFormat">setFormat</a>().<p> <p>See also <a href="#format">format</a>().<h3 class=fn>void <a name="reset"></a>QGLContext::reset ()<tt> [virtual]</tt></h3><p> Resets the context and makes it invalid.<p>See also <a href="#create">create</a>() and <a href="#isValid">isValid</a>().<h3 class=fn>void <a name="setFormat"></a>QGLContext::setFormat ( const&nbsp;<a href="qglformat.html">QGLFormat</a>&nbsp;&amp;&nbsp;format )<tt> [virtual]</tt></h3>Sets a <em>format</em> for this context. The context is <a href="#reset">reset</a>.<p> Call <a href="#create">create</a>() to create a new GL context that tries to match the newformat.<p> <pre>    QGLContext *cx;    //  ...    <a href="qglformat.html">QGLFormat</a> f;    f.<a href="qglformat.html#setStereo">setStereo</a>( TRUE );    cx-&gt;<a href="#setFormat">setFormat</a>( f );    if ( !cx-&gt;<a href="#create">create</a>() )        exit(); // no OpenGL support, or cannot render on the specified paintdevice    if ( !cx-&gt;<a href="#format">format</a>().stereo() )        exit(); // could not create stereo context  </pre> <p> <p>See also <a href="#format">format</a>(), <a href="#reset">reset</a>() and <a href="#create">create</a>().<h3 class=fn>void <a name="setInitialized"></a>QGLContext::setInitialized ( bool&nbsp;on )<tt> [protected]</tt></h3><p> If <em>on</em> is TRUE the context has been initialized, i.e.<a href="#setInitialized">QGLContext::setInitialized</a>() has been called on it. If <em>on</em> isFALSE the context has not been initialized.<p> <p>See also <a href="#initialized">initialized</a>().<h3 class=fn>void <a name="setWindowCreated"></a>QGLContext::setWindowCreated ( bool&nbsp;on )<tt> [protected]</tt></h3><p> If <em>on</em> is TRUE the context has had a window created for it. If <em>on</em> is FALSE no window has been created for the context.<p> <p>See also <a href="#windowCreated">windowCreated</a>().<h3 class=fn>void <a name="swapBuffers"></a>QGLContext::swapBuffers () const<tt> [virtual]</tt></h3><p> Swaps the screen contents with an off-screen buffer. Works only ifthe context is in double buffer mode.<p>See also <a href="qglformat.html#setDoubleBuffer">QGLFormat::setDoubleBuffer</a>().<h3 class=fn>bool <a name="windowCreated"></a>QGLContext::windowCreated () const<tt> [protected]</tt></h3><p> Returns TRUE if a window has been created for this context;otherwise returns FALSE.<p> <p>See also <a href="#setWindowCreated">setWindowCreated</a>().<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright &copy; 1995-2002<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center><table width=100% cellspacing=0 border=0><tr><td>Copyright &copy; 2002 <a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align=right><div align=right>Qt version 3.0.5</div></table></div></address></body></html>

⌨️ 快捷键说明

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