summaryrefslogtreecommitdiffstats
path: root/doc/src
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@nokia.com>2009-11-06 13:41:07 (GMT)
committerMorten Johan Sørvig <morten.sorvig@nokia.com>2009-11-06 13:41:07 (GMT)
commitaa0dfd5befb7c00ceb23a67d7f1d49e165756d28 (patch)
tree520b6c2a2f3724bce25fb5f88bad19e244ffb5a4 /doc/src
parent654cbdb901386b2a8e168cd52446abdddec1aa28 (diff)
parent5491ab9c921c8e7b89e335c7d09219153ae1d21a (diff)
downloadQt-aa0dfd5befb7c00ceb23a67d7f1d49e165756d28.zip
Qt-aa0dfd5befb7c00ceb23a67d7f1d49e165756d28.tar.gz
Qt-aa0dfd5befb7c00ceb23a67d7f1d49e165756d28.tar.bz2
Merge remote branch 'qt-official/4.6' into 4.6
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/internationalization/i18n.qdoc5
-rw-r--r--doc/src/snippets/code/src_opengl_qglshaderprogram.cpp15
2 files changed, 12 insertions, 8 deletions
diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc
index 2d1b8cc..ecc25fe 100644
--- a/doc/src/internationalization/i18n.qdoc
+++ b/doc/src/internationalization/i18n.qdoc
@@ -93,7 +93,7 @@
\o Greek
\o Hebrew
\o Thai and Lao
- \o All scripts in Unicode 4.0 that do not require special processing
+ \o All scripts in Unicode 5.1 that do not require special processing
\endlist
On Windows, Unix/X11 with FontConfig (client side font support)
@@ -112,6 +112,7 @@
\o Tamil
\o Telugu
\o Tibetan
+ \o N'Ko
\endlist
Many of these writing systems exhibit special features:
@@ -181,7 +182,7 @@
\section2 Use QString for All User-Visible Text
- Since QString uses the Unicode 4.0 encoding internally, every
+ Since QString uses the Unicode 5.1 encoding internally, every
language in the world can be processed transparently using
familiar text processing operations. Also, since all Qt functions
that present text to the user take a QString as a parameter,
diff --git a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
index 2997297..9a15f19 100644
--- a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
+++ b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
@@ -40,32 +40,32 @@
****************************************************************************/
//! [0]
-QGLShader shader(QGLShader::VertexShader);
-shader.compile(code);
+QGLShader shader(QGLShader::Vertex);
+shader.compileSourceCode(code);
QGLShaderProgram program(context);
program.addShader(shader);
program.link();
-program.enable();
+program.bind();
//! [0]
//! [1]
-program.addShader(QGLShader::VertexShader,
+program.addShaderFromSourceCode(QGLShader::Vertex,
"attribute highp vec4 vertex;\n"
"attribute mediump mat4 matrix;\n"
"void main(void)\n"
"{\n"
" gl_Position = matrix * vertex;\n"
"}");
-program.addShader(QGLShader::FragmentShader,
+program.addShaderFromSourceCode(QGLShader::Fragment,
"uniform mediump vec4 color;\n"
"void main(void)\n"
"{\n"
" gl_FragColor = color;\n"
"}");
program.link();
-program.enable();
+program.bind();
int vertexLocation = program.attributeLocation("vertex");
int matrixLocation = program.attributeLocation("matrix");
@@ -84,9 +84,12 @@ QColor color(0, 255, 0, 255);
QMatrix4x4 pmvMatrix;
pmvMatrix.ortho(rect());
+program.enableAttributeArray(vertexLocation);
program.setAttributeArray(vertexLocation, triangleVertices, 3);
program.setUniformValue(matrixLocation, pmvMatrix);
program.setUniformValue(colorLocation, color);
glDrawArrays(GL_TRIANGLES, 0, 3);
+
+program.disableAttributeArray(vertexLocation);
//! [2]