summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglshaderprogram.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-22 12:29:40 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-22 12:29:40 (GMT)
commit61d324fae094680c0ce48d4b0cc23073790f383c (patch)
treedd8048175d015e68eb60d9946a7cab99e8524b8e /src/opengl/qglshaderprogram.cpp
parentda7c6cc8995f063435b25938ac10739a6e7f0067 (diff)
parentf725e2b9cae1866ff6510cb339cc4ada363f9e4f (diff)
downloadQt-61d324fae094680c0ce48d4b0cc23073790f383c.zip
Qt-61d324fae094680c0ce48d4b0cc23073790f383c.tar.gz
Qt-61d324fae094680c0ce48d4b0cc23073790f383c.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (78 commits) Moc: Add support for rvalue references in signals and slots. Add support for polyphonic greek Fix build failure on WinCE. Autotests: if you use X11 libs, you must link to X11 libs explicitly. Disable C++0x mode for QtWebKit and QtScript since WebKit will not compile any time soon with C++0x Compile Phonon in C++0x mode. Compile Qt in C++0x mode. Avoid a data relocation by not trying to store a pointer in the .data section of plugins. Fix cast-from-ascii warning Fix compilation on Linux Fix compilation with WINSCW: #include doesn't find files in the same dir Rename m_volume to m_vol Add 2 signals, introduce side widget, make it possible to reset startId Do not create native window handle just because a parent has one. Tab color fix for document mode on Snow Leopard. Revert "Don't emit open signal on session close/error." Rename networkAccess property to networkAccessible. Don't emit open signal on session close/error. Rename private signal. Autotest: fix instability by accepting rounding errors ...
Diffstat (limited to 'src/opengl/qglshaderprogram.cpp')
-rw-r--r--src/opengl/qglshaderprogram.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/opengl/qglshaderprogram.cpp b/src/opengl/qglshaderprogram.cpp
index 739983e..55fd922 100644
--- a/src/opengl/qglshaderprogram.cpp
+++ b/src/opengl/qglshaderprogram.cpp
@@ -1290,7 +1290,8 @@ void QGLShaderProgram::setAttributeValue(int location, const QColor& value)
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- GLfloat values[4] = {value.redF(), value.greenF(), value.blueF(), value.alphaF()};
+ GLfloat values[4] = {GLfloat(value.redF()), GLfloat(value.greenF()),
+ GLfloat(value.blueF()), GLfloat(value.alphaF())};
glVertexAttrib4fv(location, values);
}
}
@@ -2025,7 +2026,8 @@ void QGLShaderProgram::setUniformValue(int location, const QColor& color)
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- GLfloat values[4] = {color.redF(), color.greenF(), color.blueF(), color.alphaF()};
+ GLfloat values[4] = {GLfloat(color.redF()), GLfloat(color.greenF()),
+ GLfloat(color.blueF()), GLfloat(color.alphaF())};
glUniform4fv(location, 1, values);
}
}
@@ -2054,7 +2056,7 @@ void QGLShaderProgram::setUniformValue(int location, const QPoint& point)
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- GLfloat values[4] = {point.x(), point.y()};
+ GLfloat values[4] = {GLfloat(point.x()), GLfloat(point.y())};
glUniform2fv(location, 1, values);
}
}
@@ -2083,7 +2085,7 @@ void QGLShaderProgram::setUniformValue(int location, const QPointF& point)
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- GLfloat values[4] = {point.x(), point.y()};
+ GLfloat values[4] = {GLfloat(point.x()), GLfloat(point.y())};
glUniform2fv(location, 1, values);
}
}
@@ -2112,7 +2114,7 @@ void QGLShaderProgram::setUniformValue(int location, const QSize& size)
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- GLfloat values[4] = {size.width(), size.width()};
+ GLfloat values[4] = {GLfloat(size.width()), GLfloat(size.width())};
glUniform2fv(location, 1, values);
}
}
@@ -2141,7 +2143,7 @@ void QGLShaderProgram::setUniformValue(int location, const QSizeF& size)
Q_D(QGLShaderProgram);
Q_UNUSED(d);
if (location != -1) {
- GLfloat values[4] = {size.width(), size.height()};
+ GLfloat values[4] = {GLfloat(size.width()), GLfloat(size.height())};
glUniform2fv(location, 1, values);
}
}
@@ -2562,9 +2564,9 @@ void QGLShaderProgram::setUniformValue(int location, const QTransform& value)
Q_UNUSED(d);
if (location != -1) {
GLfloat mat[3][3] = {
- {value.m11(), value.m12(), value.m13()},
- {value.m21(), value.m22(), value.m23()},
- {value.m31(), value.m32(), value.m33()}
+ {GLfloat(value.m11()), GLfloat(value.m12()), GLfloat(value.m13())},
+ {GLfloat(value.m21()), GLfloat(value.m22()), GLfloat(value.m23())},
+ {GLfloat(value.m31()), GLfloat(value.m32()), GLfloat(value.m33())}
};
glUniformMatrix3fv(location, 1, GL_FALSE, mat[0]);
}