path: root/src/opengl/qgl.cpp
diff options
authorCasper van Donderen <>2012-05-08 10:28:29 +0200
committerMarius Storm-Olsen <>2012-05-09 08:36:59 +0200
commit03d81b0100af4bb9d44a9fa9de55bb4e9e6a0f5d (patch)
treeac87d6ca8721771ed6890e83b4b60a12c4083f86 /src/opengl/qgl.cpp
parent97b5b8009254004608feefb903cbf44abaa099f6 (diff)
Doc: Modularize QtOpenGL documentation.
This change moves the snippets to the modularized directories. Change-Id: Ifcf22fa3f234681f851d1e7eed5fe44e2e223ffd Reviewed-by: Marius Storm-Olsen <>
Diffstat (limited to 'src/opengl/qgl.cpp')
1 files changed, 9 insertions, 9 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index e306ea4476..2801d241ee 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -208,15 +208,15 @@ QGLSignalProxy *QGLSignalProxy::instance()
There are different ways to define the display characteristics of
a rendering context. One is to create a QGLFormat and make it the
default for the entire application:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 0
+ \snippet code/src_opengl_qgl.cpp 0
Or you can specify the desired format when creating an object of
your QGLWidget subclass:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 1
+ \snippet code/src_opengl_qgl.cpp 1
After the widget has been created, you can find out which of the
requested features the system was able to provide:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 2
+ \snippet code/src_opengl_qgl.cpp 2
OpenGL is a trademark of Silicon Graphics, Inc. in the
@@ -305,7 +305,7 @@ QGLFormat::QGLFormat()
This constructor makes it easy to specify a certain desired format
in classes derived from QGLWidget, for example:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 3
+ \snippet code/src_opengl_qgl.cpp 3
Note that there are QGL::FormatOption values to turn format settings
both on and off, e.g. QGL::DepthBuffer and QGL::NoDepthBuffer,
@@ -1323,7 +1323,7 @@ QGLFormat QGLFormat::defaultFormat()
Sets a new default QGLFormat for the application to \a f. For
example, to set single buffering as the default instead of double
buffering, your main() might contain code like this:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 4
+ \snippet code/src_opengl_qgl.cpp 4
\sa defaultFormat()
@@ -1368,13 +1368,13 @@ QGLFormat QGLFormat::defaultOverlayFormat()
For example, to get a double buffered overlay context (if
available), use code like this:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 5
+ \snippet code/src_opengl_qgl.cpp 5
As usual, you can find out after widget creation whether the
underlying OpenGL system was able to provide the requested
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 6
+ \snippet code/src_opengl_qgl.cpp 6
\sa defaultOverlayFormat()
@@ -2808,7 +2808,7 @@ int QGLContext::textureCacheLimit()
Call create() to create a new GL context that tries to match the
new format.
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 7
+ \snippet code/src_opengl_qgl.cpp 7
\sa format(), reset(), create()
@@ -3226,7 +3226,7 @@ void QGLContextPrivate::setCurrentContext(QGLContext *context)
Here is a rough outline of how a QGLWidget subclass might look:
- \snippet doc/src/snippets/code/src_opengl_qgl.cpp 8
+ \snippet code/src_opengl_qgl.cpp 8
If you need to trigger a repaint from places other than paintGL()
(a typical example is when using \link QTimer timers\endlink to