Doc: Fix some documentation issues.
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>
Thu, 30 Aug 2012 13:22:59 +0000 (15:22 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 31 Aug 2012 19:23:38 +0000 (21:23 +0200)
Change-Id: I21bba7b8a1808cf214cae1b7d3b6b5e41e36e3ba
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
src/gui/kernel/qopenglcontext.cpp
src/gui/opengl/qopenglframebufferobject.cpp
src/gui/opengl/qopenglfunctions.cpp
src/gui/opengl/qopenglpaintdevice.cpp

index aa1b92e..399b7ff 100644 (file)
@@ -210,7 +210,7 @@ QOpenGLContext* QOpenGLContext::currentContext()
 }
 
 /*!
-    Returns true if the two contexts are sharing OpenGL resources.
+    Returns true if the \a first and \a second contexts are sharing OpenGL resources.
 */
 bool QOpenGLContext::areSharing(QOpenGLContext *first, QOpenGLContext *second)
 {
@@ -243,7 +243,7 @@ QPlatformOpenGLContext *QOpenGLContext::shareHandle() const
 }
 
 /*!
-    Creates a new OpenGL context instance.
+    Creates a new OpenGL context instance with parent object \a parent.
 
     Before it can be used you need to set the proper format and call create().
 
@@ -267,8 +267,8 @@ void QOpenGLContext::setFormat(const QSurfaceFormat &format)
 }
 
 /*!
-    Sets the context to share textures, shaders, and other OpenGL resources
-    with. You need to call create() before it takes effect.
+    Makes this context share textures, shaders, and other OpenGL resources
+    with \a shareContext. You need to call create() before it takes effect.
 */
 void QOpenGLContext::setShareContext(QOpenGLContext *shareContext)
 {
@@ -460,7 +460,7 @@ GLuint QOpenGLContext::defaultFramebufferObject() const
 
 /*!
     Makes the context current in the current thread, against the given
-    \a surface.
+    \a surface. Returns true if successful.
 
     If \a surface is 0 this is equivalent to calling doneCurrent().
 
@@ -546,7 +546,7 @@ QSurface *QOpenGLContext::surface() const
 
 
 /*!
-    Swap the back and front buffers of the given surface.
+    Swap the back and front buffers of \a surface.
 
     Call this to finish a frame of OpenGL rendering, and make sure to
     call makeCurrent() again before you begin a new frame.
index 81c060f..09d7a77 100644 (file)
@@ -1175,7 +1175,7 @@ QOpenGLFramebufferObject::Attachment QOpenGLFramebufferObject::attachment() cons
 }
 
 /*!
-    Sets the attachments of the framebuffer object.
+    Sets the attachments of the framebuffer object to \a attachment.
 
     This can be used to free or reattach the depth and stencil buffer
     attachments as needed.
index 2142c55..30e290f 100644 (file)
@@ -96,7 +96,7 @@ QT_BEGIN_NAMESPACE
     void MyGLWindow::initializeGL()
     {
         m_context->makeCurrent(this);
-        initializeGLFunctions();
+        initializeOpenGLFunctions();
     }
     \endcode
 
@@ -157,6 +157,7 @@ QT_BEGIN_NAMESPACE
     \value Multisample glSampleCoverage() function is available.
     \value StencilSeparate Separate stencil functions are available.
     \value NPOTTextures Non power of two textures are available.
+    \value NPOTTextureRepeat Non power of two textures can use GL_REPEAT as wrap parameter.
 */
 
 // Hidden private fields for additional extension data.
@@ -198,10 +199,10 @@ static QOpenGLFunctionsPrivateEx *qt_gl_functions(QOpenGLContext *context = 0)
 
 /*!
     Constructs a default function resolver. The resolver cannot
-    be used until initializeGLFunctions() is called to specify
+    be used until initializeOpenGLFunctions() is called to specify
     the context.
 
-    \sa initializeGLFunctions()
+    \sa initializeOpenGLFunctions()
 */
 QOpenGLFunctions::QOpenGLFunctions()
     : d_ptr(0)
@@ -215,10 +216,10 @@ QOpenGLFunctions::QOpenGLFunctions()
     The context or another context in the group must be current.
 
     An object constructed in this way can only be used with \a context
-    and other contexts that share with it.  Use initializeGLFunctions()
+    and other contexts that share with it.  Use initializeOpenGLFunctions()
     to change the object's context association.
 
-    \sa initializeGLFunctions()
+    \sa initializeOpenGLFunctions()
 */
 QOpenGLFunctions::QOpenGLFunctions(QOpenGLContext *context)
     : d_ptr(0)
@@ -440,6 +441,13 @@ bool QOpenGLExtensions::hasOpenGLExtension(QOpenGLExtensions::OpenGLExtension ex
 }
 
 /*!
+    \fn void QOpenGLFunctions::initializeGLFunctions()
+    \obsolete
+
+    Use initializeOpenGLFunctions() instead.
+*/
+
+/*!
     Initializes OpenGL function resolution for the current context.
 
     After calling this function, the QOpenGLFunctions object can only be
@@ -1456,6 +1464,11 @@ void QOpenGLFunctions::initializeOpenGLFunctions()
     This convenience function will do nothing on OpenGL/ES 1.x systems.
 */
 
+/*!
+    \fn bool QOpenGLFunctions::isInitialized(const QOpenGLFunctionsPrivate *d)
+    \internal
+*/
+
 namespace {
 
 enum ResolvePolicy
index e070ee6..09bd442 100644 (file)
@@ -111,7 +111,7 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(const QSize &size)
 }
 
 /*!
-    Constructs a QOpenGLPaintDevice with the given \a size and \a ctx.
+    Constructs a QOpenGLPaintDevice with the given \a width and \a height.
 
     The QOpenGLPaintDevice is only valid for the current context.
 
@@ -122,11 +122,21 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(int width, int height)
 {
 }
 
+/*!
+    Destroys the QOpenGLPaintDevice.
+*/
+
 QOpenGLPaintDevice::~QOpenGLPaintDevice()
 {
     delete d_ptr->engine;
 }
 
+/*!
+    \fn int QOpenGLPaintDevice::devType() const
+    \internal
+    \reimp
+*/
+
 QOpenGLPaintDevicePrivate::QOpenGLPaintDevicePrivate(const QSize &sz)
     : size(sz)
     , ctx(QOpenGLContext::currentContext())
@@ -153,6 +163,10 @@ private:
 
 Q_GLOBAL_STATIC(QOpenGLEngineThreadStorage, qt_opengl_engine)
 
+/*!
+    \reimp
+*/
+
 QPaintEngine *QOpenGLPaintDevice::paintEngine() const
 {
     if (d_ptr->engine)
@@ -167,21 +181,41 @@ QPaintEngine *QOpenGLPaintDevice::paintEngine() const
     return engine;
 }
 
+/*!
+    Returns the OpenGL context associated with the paint device.
+*/
+
 QOpenGLContext *QOpenGLPaintDevice::context() const
 {
     return d_ptr->ctx;
 }
 
+/*!
+    Returns the pixel size of the paint device.
+
+    \sa setSize()
+*/
+
 QSize QOpenGLPaintDevice::size() const
 {
     return d_ptr->size;
 }
 
+/*!
+    Sets the pixel size of the paint device to \a size.
+
+    \sa size()
+*/
+
 void QOpenGLPaintDevice::setSize(const QSize &size)
 {
     d_ptr->size = size;
 }
 
+/*!
+    \reimp
+*/
+
 int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
 {
     switch (metric) {
@@ -211,34 +245,66 @@ int QOpenGLPaintDevice::metric(QPaintDevice::PaintDeviceMetric metric) const
     }
 }
 
+/*!
+    Returns the number of pixels per meter horizontally.
+
+    \sa setDotsPerMeterX()
+*/
+
 qreal QOpenGLPaintDevice::dotsPerMeterX() const
 {
     return d_ptr->dpmx;
 }
 
+/*!
+    Returns the number of pixels per meter vertically.
+
+    \sa setDotsPerMeterY()
+*/
+
 qreal QOpenGLPaintDevice::dotsPerMeterY() const
 {
     return d_ptr->dpmy;
 }
 
+/*!
+    Sets the number of pixels per meter horizontally to \a dpmx.
+
+    \sa dotsPerMeterX()
+*/
+
 void QOpenGLPaintDevice::setDotsPerMeterX(qreal dpmx)
 {
     d_ptr->dpmx = dpmx;
 }
 
+/*!
+    Sets the number of pixels per meter vertically to \a dpmy.
+
+    \sa dotsPerMeterY()
+*/
+
 void QOpenGLPaintDevice::setDotsPerMeterY(qreal dpmy)
 {
     d_ptr->dpmx = dpmy;
 }
 
 /*!
-    Specifies whether painting should be flipped around the Y-axis or not.
+    Sets whether painting should be flipped around the Y-axis or not to \a flipped.
+
+    \sa paintFlipped()
 */
 void QOpenGLPaintDevice::setPaintFlipped(bool flipped)
 {
     d_ptr->flipped = flipped;
 }
 
+/*!
+    Returns true if painting is flipped around the Y-axis.
+
+    \sa setPaintFlipped()
+*/
+
 bool QOpenGLPaintDevice::paintFlipped() const
 {
     return d_ptr->flipped;