summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-05-10 22:20:36 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-05-10 22:20:36 (GMT)
commita93e6cbae8dfa71aad2da9a69f5320bd44bc8dab (patch)
tree675f136da8258c64d063d924861382ae980c3928
parent6395cd6d6ccbf0c15f77ef3061a0bac7189c575b (diff)
parentd03757e2bcf267790bf84d1b0e78c39c87b571ca (diff)
downloadQt-a93e6cbae8dfa71aad2da9a69f5320bd44bc8dab.zip
Qt-a93e6cbae8dfa71aad2da9a69f5320bd44bc8dab.tar.gz
Qt-a93e6cbae8dfa71aad2da9a69f5320bd44bc8dab.tar.bz2
Merge branch 'shader-api'
-rw-r--r--demos/boxes/scene.cpp18
-rw-r--r--src/opengl/qglpixmapfilter.cpp2
2 files changed, 10 insertions, 10 deletions
diff --git a/demos/boxes/scene.cpp b/demos/boxes/scene.cpp
index db32928..e2aa16b 100644
--- a/demos/boxes/scene.cpp
+++ b/demos/boxes/scene.cpp
@@ -680,9 +680,9 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
if (glActiveTexture) {
m_environment->bind();
m_environmentProgram->enable();
- m_environmentProgram->setUniformValue("tex", 0);
- m_environmentProgram->setUniformValue("env", 1);
- m_environmentProgram->setUniformValue("noise", 2);
+ m_environmentProgram->setUniformValue("tex", GLint(0));
+ m_environmentProgram->setUniformValue("env", GLint(1));
+ m_environmentProgram->setUniformValue("noise", GLint(2));
m_box->draw();
m_environmentProgram->disable();
m_environment->unbind();
@@ -715,9 +715,9 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
m_environment->bind();
}
m_programs[i]->enable();
- m_programs[i]->setUniformValue("tex", 0);
- m_programs[i]->setUniformValue("env", 1);
- m_programs[i]->setUniformValue("noise", 2);
+ m_programs[i]->setUniformValue("tex", GLint(0));
+ m_programs[i]->setUniformValue("env", GLint(1));
+ m_programs[i]->setUniformValue("noise", GLint(2));
m_programs[i]->setUniformValue("view", view);
m_programs[i]->setUniformValue("invView", invView);
m_box->draw();
@@ -746,9 +746,9 @@ void Scene::renderBoxes(const QMatrix4x4 &view, int excludeBox)
}
m_programs[m_currentShader]->enable();
- m_programs[m_currentShader]->setUniformValue("tex", 0);
- m_programs[m_currentShader]->setUniformValue("env", 1);
- m_programs[m_currentShader]->setUniformValue("noise", 2);
+ m_programs[m_currentShader]->setUniformValue("tex", GLint(0));
+ m_programs[m_currentShader]->setUniformValue("env", GLint(1));
+ m_programs[m_currentShader]->setUniformValue("noise", GLint(2));
m_programs[m_currentShader]->setUniformValue("view", view);
m_programs[m_currentShader]->setUniformValue("invView", invView);
m_box->draw();
diff --git a/src/opengl/qglpixmapfilter.cpp b/src/opengl/qglpixmapfilter.cpp
index 87abf60..5d4d5bf 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -183,7 +183,7 @@ QGLPixmapColorizeFilter::QGLPixmapColorizeFilter()
m_program.addShader(QGLShader::FragmentShader, qt_gl_colorize_filter);
m_program.link();
m_program.enable();
- m_program.setUniformValue(m_program.uniformLocation("texture"), 0); // GL_TEXTURE_0
+ m_program.setUniformValue(m_program.uniformLocation("texture"), GLint(0)); // GL_TEXTURE_0
m_colorUniform = m_program.uniformLocation("color");
}