diff options
Diffstat (limited to 'doc/html/qglwidget.html')
-rw-r--r-- | doc/html/qglwidget.html | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/doc/html/qglwidget.html b/doc/html/qglwidget.html index 694f71820..4bfed71a7 100644 --- a/doc/html/qglwidget.html +++ b/doc/html/qglwidget.html @@ -33,8 +33,8 @@ body { background: #ffffff; color: black; } <p>The TQGLWidget class is a widget for rendering OpenGL graphics. <a href="#details">More...</a> -<p><tt>#include <<a href="qgl-h.html">qgl.h</a>></tt> -<p>Inherits <a href="qwidget.html">TQWidget</a> and <a href="qgl.html">TQGL</a>. +<p><tt>#include <<a href="qgl-h.html">ntqgl.h</a>></tt> +<p>Inherits <a href="ntqwidget.html">TQWidget</a> and <a href="ntqgl.html">TQGL</a>. <p><a href="qglwidget-members.html">List of all member functions.</a> <h2>Public Members</h2> <ul> @@ -97,8 +97,8 @@ The TQGLWidget class is a widget for rendering OpenGL graphics. <p> TQGLWidget provides functionality for displaying OpenGL<sup>*</sup> graphics integrated into a TQt application. It is very simple to use. You inherit from it and use the subclass like any other -<a href="qwidget.html">TQWidget</a>, except that instead of drawing the widget's contents -using <a href="qpainter.html">TQPainter</a> etc. you use the standard OpenGL rendering +<a href="ntqwidget.html">TQWidget</a>, except that instead of drawing the widget's contents +using <a href="ntqpainter.html">TQPainter</a> etc. you use the standard OpenGL rendering commands. <p> TQGLWidget provides three convenient virtual functions that you can reimplement in your subclass to perform the typical OpenGL tasks: @@ -120,7 +120,7 @@ paintGL() is called. Q_OBJECT // must include this if you use TQt signals/slots public: - MyGLDrawer( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) + MyGLDrawer( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) : TQGLWidget(parent, name) {} protected: @@ -161,7 +161,7 @@ paintGL() is called. </pre> <p> If you need to trigger a repaint from places other than <a href="#paintGL">paintGL</a>() -(a typical example is when using <a href="qtimer.html">timers</a> to +(a typical example is when using <a href="ntqtimer.html">timers</a> to animate scenes), you should call the widget's <a href="#updateGL">updateGL</a>() function. <p> Your widget's OpenGL rendering context is made current when paintGL(), <a href="#resizeGL">resizeGL</a>(), or <a href="#initializeGL">initializeGL</a>() is called. If you need to @@ -198,14 +198,14 @@ United States and other countries. <p>See also <a href="graphics.html">Graphics Classes</a> and <a href="images.html">Image Processing Classes</a>. <hr><h2>Member Function Documentation</h2> -<h3 class=fn><a name="TQGLWidget"></a>TQGLWidget::TQGLWidget ( <a href="qwidget.html">TQWidget</a> * parent = 0, const char * name = 0, const <a href="qglwidget.html">TQGLWidget</a> * shareWidget = 0, WFlags f = 0 ) +<h3 class=fn><a name="TQGLWidget"></a>TQGLWidget::TQGLWidget ( <a href="ntqwidget.html">TQWidget</a> * parent = 0, const char * name = 0, const <a href="qglwidget.html">TQGLWidget</a> * shareWidget = 0, WFlags f = 0 ) </h3> Constructs an OpenGL widget with a <em>parent</em> widget and a <em>name</em>. <p> The <a href="qglformat.html#defaultFormat">default format</a> is used. The widget will be <a href="#isValid">invalid</a> if the system has no <a href="qglformat.html#hasOpenGL">OpenGL support</a>. -<p> The <em>parent</em>, <em>name</em> and <a href="qt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments are passed -to the <a href="qwidget.html">TQWidget</a> constructor. +<p> The <em>parent</em>, <em>name</em> and <a href="ntqt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments are passed +to the <a href="ntqwidget.html">TQWidget</a> constructor. <p> If the <em>shareWidget</em> parameter points to a valid TQGLWidget, this widget will share OpenGL display lists with <em>shareWidget</em>. If this widget and <em>shareWidget</em> have different <a href="#format">formats</a>, display list sharing may fail. You can check @@ -215,7 +215,7 @@ by overriding the <a href="#initializeGL">initializeGL</a>() function, rather th constructor of your TQGLWidget subclass. <p> <p>See also <a href="qglformat.html#defaultFormat">TQGLFormat::defaultFormat</a>(). -<h3 class=fn><a name="TQGLWidget-2"></a>TQGLWidget::TQGLWidget ( <a href="qglcontext.html">TQGLContext</a> * context, <a href="qwidget.html">TQWidget</a> * parent, const char * name = 0, const <a href="qglwidget.html">TQGLWidget</a> * shareWidget = 0, WFlags f = 0 ) +<h3 class=fn><a name="TQGLWidget-2"></a>TQGLWidget::TQGLWidget ( <a href="qglcontext.html">TQGLContext</a> * context, <a href="ntqwidget.html">TQWidget</a> * parent, const char * name = 0, const <a href="qglwidget.html">TQGLWidget</a> * shareWidget = 0, WFlags f = 0 ) </h3> Constructs an OpenGL widget with parent <em>parent</em>, called <em>name</em>. <p> The <em>context</em> argument is a pointer to the <a href="qglcontext.html">TQGLContext</a> that @@ -223,8 +223,8 @@ you wish to be bound to this widget. This allows you to pass in your own TQGLContext sub-classes. <p> The widget will be <a href="#isValid">invalid</a> if the system has no <a href="qglformat.html#hasOpenGL">OpenGL support</a>. -<p> The <em>parent</em>, <em>name</em> and <a href="qt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments are passed -to the <a href="qwidget.html">TQWidget</a> constructor. +<p> The <em>parent</em>, <em>name</em> and <a href="ntqt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments are passed +to the <a href="ntqwidget.html">TQWidget</a> constructor. <p> If the <em>shareWidget</em> parameter points to a valid TQGLWidget, this widget will share OpenGL display lists with <em>shareWidget</em>. If this widget and <em>shareWidget</em> have different <a href="#format">formats</a>, display list sharing may fail. You can check @@ -234,7 +234,7 @@ by overriding the <a href="#initializeGL">initializeGL</a>() function, rather th constructor of your TQGLWidget subclass. <p> <p>See also <a href="qglformat.html#defaultFormat">TQGLFormat::defaultFormat</a>() and <a href="#isValid">isValid</a>(). -<h3 class=fn><a name="TQGLWidget-3"></a>TQGLWidget::TQGLWidget ( const <a href="qglformat.html">TQGLFormat</a> & format, <a href="qwidget.html">TQWidget</a> * parent = 0, const char * name = 0, const <a href="qglwidget.html">TQGLWidget</a> * shareWidget = 0, WFlags f = 0 ) +<h3 class=fn><a name="TQGLWidget-3"></a>TQGLWidget::TQGLWidget ( const <a href="qglformat.html">TQGLFormat</a> & format, <a href="ntqwidget.html">TQWidget</a> * parent = 0, const char * name = 0, const <a href="qglwidget.html">TQGLWidget</a> * shareWidget = 0, WFlags f = 0 ) </h3> Constructs an OpenGL widget with parent <em>parent</em>, called <em>name</em>. <p> The <em>format</em> argument specifies the desired <a href="qglformat.html">rendering options</a>. If the underlying OpenGL/Window system @@ -243,8 +243,8 @@ nearest subset of features will be used. After creation, the <a href="#format">format</a>() method will return the actual format obtained. <p> The widget will be <a href="#isValid">invalid</a> if the system has no <a href="qglformat.html#hasOpenGL">OpenGL support</a>. -<p> The <em>parent</em>, <em>name</em> and <a href="qt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments are passed -to the <a href="qwidget.html">TQWidget</a> constructor. +<p> The <em>parent</em>, <em>name</em> and <a href="ntqt.html#WidgetFlags">widget flag</a>, <em>f</em>, arguments are passed +to the <a href="ntqwidget.html">TQWidget</a> constructor. <p> If the <em>shareWidget</em> parameter points to a valid TQGLWidget, this widget will share OpenGL display lists with <em>shareWidget</em>. If this widget and <em>shareWidget</em> have different <a href="#format">formats</a>, display list sharing may fail. You can check @@ -265,7 +265,7 @@ Destroys the widget. otherwise returns FALSE. <p> <p>See also <a href="#setAutoBufferSwap">setAutoBufferSwap</a>(). -<h3 class=fn>const <a href="qglcolormap.html">TQGLColormap</a> & <a name="colormap"></a>TQGLWidget::colormap () const +<h3 class=fn>const <a href="ntqglcolormap.html">TQGLColormap</a> & <a name="colormap"></a>TQGLWidget::colormap () const </h3> <p> Returns the colormap for this widget. @@ -284,17 +284,17 @@ returned will be empty. example, if the underlying hardware does not support the format attributes that were requested. -<h3 class=fn><a href="qimage.html">TQImage</a> <a name="convertToGLFormat"></a>TQGLWidget::convertToGLFormat ( const <a href="qimage.html">TQImage</a> & img )<tt> [static]</tt> +<h3 class=fn><a href="ntqimage.html">TQImage</a> <a name="convertToGLFormat"></a>TQGLWidget::convertToGLFormat ( const <a href="ntqimage.html">TQImage</a> & img )<tt> [static]</tt> </h3> Converts the image <em>img</em> into the unnamed format expected by OpenGL functions such as glTexImage2D(). The returned image is not -usable as a <a href="qimage.html">TQImage</a>, but <a href="qimage.html#width">TQImage::width</a>(), <a href="qimage.html#height">TQImage::height</a>() and -<a href="qimage.html#bits">TQImage::bits</a>() may be used with OpenGL. The following few lines +usable as a <a href="ntqimage.html">TQImage</a>, but <a href="ntqimage.html#width">TQImage::width</a>(), <a href="ntqimage.html#height">TQImage::height</a>() and +<a href="ntqimage.html#bits">TQImage::bits</a>() may be used with OpenGL. The following few lines are from the texture example. Most of the code is irrelevant, so we just quote the relevant bits: <p> -<pre> <a href="qimage.html">TQImage</a> tex1, tex2, buf; +<pre> <a href="ntqimage.html">TQImage</a> tex1, tex2, buf; if ( !buf.load( "gllogo.bmp" ) ) { // Load first image from file </pre> <p> We create <em>tex1</em> (and another variable) for OpenGL, and load a real @@ -303,8 +303,8 @@ image into <em>buf</em>. </pre> <p> A few lines later, we convert <em>buf</em> into OpenGL format and store it in <em>tex1</em>. -<p> <pre> <a name="x2121"></a><a name="x2120"></a> glTexImage2D( GL_TEXTURE_2D, 0, 3, tex1.<a href="qimage.html#width">width</a>(), tex1.<a href="qimage.html#height">height</a>(), 0, - <a name="x2119"></a> GL_RGBA, GL_UNSIGNED_BYTE, tex1.<a href="qimage.html#bits">bits</a>() ); +<p> <pre> <a name="x2121"></a><a name="x2120"></a> glTexImage2D( GL_TEXTURE_2D, 0, 3, tex1.<a href="ntqimage.html#width">width</a>(), tex1.<a href="ntqimage.html#height">height</a>(), 0, + <a name="x2119"></a> GL_RGBA, GL_UNSIGNED_BYTE, tex1.<a href="ntqimage.html#bits">bits</a>() ); </pre> <p> Note the dimension restrictions for texture images as described in the glTexImage2D() documentation. The width must be 2^m + 2*border @@ -343,7 +343,7 @@ Executes the virtual function <a href="#paintGL">paintGL</a>(). Initializes OpenGL for this widget's context. Calls the virtual function <a href="#initializeGL">initializeGL</a>(). -<h3 class=fn><a href="qimage.html">TQImage</a> <a name="grabFrameBuffer"></a>TQGLWidget::grabFrameBuffer ( bool withAlpha = FALSE )<tt> [virtual]</tt> +<h3 class=fn><a href="ntqimage.html">TQImage</a> <a name="grabFrameBuffer"></a>TQGLWidget::grabFrameBuffer ( bool withAlpha = FALSE )<tt> [virtual]</tt> </h3> Returns an image of the frame buffer. If <em>withAlpha</em> is TRUE the alpha channel is included. @@ -420,7 +420,7 @@ be called. <p> The widget's rendering context will become the current context and <a href="#initializeGL">initializeGL</a>() will be called if it hasn't already been called. -<p>Reimplemented from <a href="qwidget.html#paintEvent">TQWidget</a>. +<p>Reimplemented from <a href="ntqwidget.html#paintEvent">TQWidget</a>. <h3 class=fn>void <a name="paintGL"></a>TQGLWidget::paintGL ()<tt> [virtual protected]</tt> </h3> This virtual function is called whenever the widget needs to be @@ -438,21 +438,21 @@ Reimplement it in a subclass. <p> There is no need to call <a href="#makeOverlayCurrent">makeOverlayCurrent</a>() because this has already been done when this function is called. -<h3 class=fn>void <a name="qglClearColor"></a>TQGLWidget::qglClearColor ( const <a href="qcolor.html">TQColor</a> & c ) const +<h3 class=fn>void <a name="qglClearColor"></a>TQGLWidget::qglClearColor ( const <a href="ntqcolor.html">TQColor</a> & c ) const </h3> Convenience function for specifying the clearing color to OpenGL. Calls glClearColor (in RGBA mode) or glClearIndex (in color-index mode) with the color <em>c</em>. Applies to the current GL context. -<p> <p>See also <a href="#qglColor">qglColor</a>(), <a href="qglcontext.html#currentContext">TQGLContext::currentContext</a>(), and <a href="qcolor.html">TQColor</a>. +<p> <p>See also <a href="#qglColor">qglColor</a>(), <a href="qglcontext.html#currentContext">TQGLContext::currentContext</a>(), and <a href="ntqcolor.html">TQColor</a>. -<h3 class=fn>void <a name="qglColor"></a>TQGLWidget::qglColor ( const <a href="qcolor.html">TQColor</a> & c ) const +<h3 class=fn>void <a name="qglColor"></a>TQGLWidget::qglColor ( const <a href="ntqcolor.html">TQColor</a> & c ) const </h3> Convenience function for specifying a drawing color to OpenGL. Calls glColor3 (in RGBA mode) or glIndex (in color-index mode) with the color <em>c</em>. Applies to the current GL context. -<p> <p>See also <a href="#qglClearColor">qglClearColor</a>(), <a href="qglcontext.html#currentContext">TQGLContext::currentContext</a>(), and <a href="qcolor.html">TQColor</a>. +<p> <p>See also <a href="#qglClearColor">qglClearColor</a>(), <a href="qglcontext.html#currentContext">TQGLContext::currentContext</a>(), and <a href="ntqcolor.html">TQColor</a>. -<h3 class=fn><a href="qpixmap.html">TQPixmap</a> <a name="renderPixmap"></a>TQGLWidget::renderPixmap ( int w = 0, int h = 0, bool useContext = FALSE )<tt> [virtual]</tt> +<h3 class=fn><a href="ntqpixmap.html">TQPixmap</a> <a name="renderPixmap"></a>TQGLWidget::renderPixmap ( int w = 0, int h = 0, bool useContext = FALSE )<tt> [virtual]</tt> </h3> Renders the current scene on a pixmap and returns the pixmap. <p> You can use this method on both visible and invisible TQGLWidgets. @@ -474,7 +474,7 @@ frustum etc. should be done from within initializeGL(). If this is not done, the temporary TQGLContext will not be initialized properly, and the rendered pixmap may be incomplete/corrupted. -<h3 class=fn>void <a name="renderText"></a>TQGLWidget::renderText ( int x, int y, const <a href="qstring.html">TQString</a> & str, const <a href="qfont.html">TQFont</a> & fnt = TQFont ( ), int listBase = 2000 ) +<h3 class=fn>void <a name="renderText"></a>TQGLWidget::renderText ( int x, int y, const <a href="ntqstring.html">TQString</a> & str, const <a href="ntqfont.html">TQFont</a> & fnt = TQFont ( ), int listBase = 2000 ) </h3> Renders the string <em>str</em> into the GL context of this widget. <p> <em>x</em> and <em>y</em> are specified in window coordinates, with the origin @@ -496,7 +496,7 @@ change this value unless you are using lists in the same range. The lists are deleted when the widget is destroyed. <p> Note: This function only works reliably with ASCII strings. -<h3 class=fn>void <a name="renderText-2"></a>TQGLWidget::renderText ( double x, double y, double z, const <a href="qstring.html">TQString</a> & str, const <a href="qfont.html">TQFont</a> & fnt = TQFont ( ), int listBase = 2000 ) +<h3 class=fn>void <a name="renderText-2"></a>TQGLWidget::renderText ( double x, double y, double z, const <a href="ntqstring.html">TQString</a> & str, const <a href="ntqfont.html">TQFont</a> & fnt = TQFont ( ), int listBase = 2000 ) </h3> This is an overloaded member function, provided for convenience. It behaves essentially like the above function. <p> <em>x</em>, <em>y</em> and <em>z</em> are specified in scene or object coordinates relative to the currently set projection and model matrices. This @@ -508,7 +508,7 @@ have the labels move with the model as it is rotated etc. <p> Handles resize events. Calls the virtual function <a href="#resizeGL">resizeGL</a>(). -<p>Reimplemented from <a href="qwidget.html#resizeEvent">TQWidget</a>. +<p>Reimplemented from <a href="ntqwidget.html#resizeEvent">TQWidget</a>. <h3 class=fn>void <a name="resizeGL"></a>TQGLWidget::resizeGL ( int width, int height )<tt> [virtual protected]</tt> </h3> @@ -540,7 +540,7 @@ swapped after each <a href="#paintGL">paintGL</a>() call. <p> The buffer auto-swapping is on by default. <p> <p>See also <a href="#autoBufferSwap">autoBufferSwap</a>(), <a href="#doubleBuffer">doubleBuffer</a>(), and <a href="#swapBuffers">swapBuffers</a>(). -<h3 class=fn>void <a name="setColormap"></a>TQGLWidget::setColormap ( const <a href="qglcolormap.html">TQGLColormap</a> & cmap ) +<h3 class=fn>void <a name="setColormap"></a>TQGLWidget::setColormap ( const <a href="ntqglcolormap.html">TQGLColormap</a> & cmap ) </h3> <p> Set the colormap for this widget to <em>cmap</em>. Usually it is only |