diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-08-11 16:34:48 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-08-11 16:34:48 (GMT) |
commit | 319f4f07c80664d6e244daf22d9b4c13e5d4e69a (patch) | |
tree | 60c2b9b1462eab6eab6a15f541fe361c7a878eab /src/opengl | |
parent | ccb838e6d4e661c9280d5c69fa0b1717b85a1dd9 (diff) | |
parent | 8dca92fd7987a9aa727dea6c367c079a39668f09 (diff) | |
download | Qt-319f4f07c80664d6e244daf22d9b4c13e5d4e69a.zip Qt-319f4f07c80664d6e244daf22d9b4c13e5d4e69a.tar.gz Qt-319f4f07c80664d6e244daf22d9b4c13e5d4e69a.tar.bz2 |
Merge remote branch 'origin/4.6' into qt-4.7-from-4.6
Conflicts:
src/gui/kernel/qt_s60_p.h
src/opengl/qglextensions.cpp
src/opengl/qglshaderprogram.cpp
tests/auto/mediaobject/tst_mediaobject.cpp
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qglextensions.cpp | 4 | ||||
-rw-r--r-- | src/opengl/qglshaderprogram.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/opengl/qglextensions.cpp b/src/opengl/qglextensions.cpp index 8e2bbd4..6aec8ae 100644 --- a/src/opengl/qglextensions.cpp +++ b/src/opengl/qglextensions.cpp @@ -255,6 +255,10 @@ bool qt_resolve_glsl_extensions(QGLContext *ctx) glFramebufferTextureLayerEXT = (_glFramebufferTextureLayerEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureLayerEXT")); glFramebufferTextureFaceEXT = (_glFramebufferTextureFaceEXT) ctx->getProcAddress(QLatin1String("glFramebufferTextureFaceEXT")); + // Must at least have the FragmentShader extension to continue. + if (!(QGLExtensions::glExtensions() & QGLExtensions::FragmentShader)) + return false; + glCreateShader = (_glCreateShader) ctx->getProcAddress(QLatin1String("glCreateShader")); if (glCreateShader) { glShaderSource = (_glShaderSource) ctx->getProcAddress(QLatin1String("glShaderSource")); diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp index c7689b8..74382b0 100644 --- a/src/opengl/qglshaderprogram.cpp +++ b/src/opengl/qglshaderprogram.cpp @@ -2121,7 +2121,7 @@ void QGLShaderProgram::setUniformValue(int location, const QSize& size) Q_D(QGLShaderProgram); Q_UNUSED(d); if (location != -1) { - GLfloat values[4] = {GLfloat(size.width()), GLfloat(size.width())}; + GLfloat values[4] = {GLfloat(size.width()), GLfloat(size.height())}; glUniform2fv(location, 1, values); } } |