summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets
diff options
context:
space:
mode:
authorDavid Boddie <david.boddie@nokia.com>2011-07-19 14:52:20 (GMT)
committerDavid Boddie <david.boddie@nokia.com>2011-07-19 14:52:20 (GMT)
commit41287c411cb4b1019d12a49ddf7a738174a42f25 (patch)
treed79ecd05158be384230857d5800764e1adef3659 /doc/src/snippets
parentdf244b77b3a5370db071cd1a08f9e24c8cd78803 (diff)
downloadQt-41287c411cb4b1019d12a49ddf7a738174a42f25.zip
Qt-41287c411cb4b1019d12a49ddf7a738174a42f25.tar.gz
Qt-41287c411cb4b1019d12a49ddf7a738174a42f25.tar.bz2
Doc: Fixed shader program snippet.
Task-number: QTBUG-18982 Reviewed-by: Kim Motoyoshi Kalland
Diffstat (limited to 'doc/src/snippets')
-rw-r--r--doc/src/snippets/code/src_opengl_qglshaderprogram.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
index aa5225a..812adf9 100644
--- a/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
+++ b/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
@@ -52,7 +52,7 @@ program.bind();
//! [1]
program.addShaderFromSourceCode(QGLShader::Vertex,
"attribute highp vec4 vertex;\n"
- "attribute mediump mat4 matrix;\n"
+ "uniform highp mat4 matrix;\n"
"void main(void)\n"
"{\n"
" gl_Position = matrix * vertex;\n"
@@ -67,7 +67,7 @@ program.link();
program.bind();
int vertexLocation = program.attributeLocation("vertex");
-int matrixLocation = program.attributeLocation("matrix");
+int matrixLocation = program.uniformLocation("matrix");
int colorLocation = program.uniformLocation("color");
//! [1]