summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-04 12:21:07 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-04 12:21:07 (GMT)
commit71bc8dc21687f1b15fc75a789f91753ace771b84 (patch)
treeac2f3414c1dbf8ebbbccb55f2c44e709225db850 /doc/src/snippets/code/src_opengl_qglshaderprogram.cpp
parent993daec234fb36af8b7ceff8ec81082c90d53052 (diff)
parent920ce5ed71bc456e429b887801a8d8bea7a3db0d (diff)
downloadQt-71bc8dc21687f1b15fc75a789f91753ace771b84.zip
Qt-71bc8dc21687f1b15fc75a789f91753ace771b84.tar.gz
Qt-71bc8dc21687f1b15fc75a789f91753ace771b84.tar.bz2
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qt-releng-team
* 'master' of git://scm.dev.nokia.troll.no/qt/qt-releng-team: (189 commits) Fixed compile error in qwindowsurface_qws.cpp. Fixed regression introduced by 5842d19cf3dff37a85c. Remove DerivedSources.pro from WebKit. Support debuggable in the makefile build system QLabel documentation: add warning about sanitizing input Mark all Symbian debug binaries debuggable by default Detect linked fonts by name (insead of via CLinkedTypeface* Api) Revert "fix QFileInfo::isSymLink() for NTFS mount points" Fix typo for ifdef QT_NO_ACCESSIBILITY Call QAccessible::updateAccessibility when a widget is deleted Fix gamma corrected source color in GL Make macdeployqt more robust against usage of symbolic links. Revert binary search in QTextEngine::findItem Remove a duplicate include line Document support for Linguist on Mac. Save previous font engine for right bearing adjustment Symbian^3 workaround: Avoid usage of linked fonts. Make it possible to update a related table after an external update Make mac(deploy|change)qt handle dylibs that use Qt inside an app bundle. Guard macdeployqt against @rpath and @loader_path too. ...
Diffstat (limited to 'doc/src/snippets/code/src_opengl_qglshaderprogram.cpp')
-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]