summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 4b811e5..83e6717 100644
--- a/src/opengl/qglpixmapfilter.cpp
+++ b/src/opengl/qglpixmapfilter.cpp
@@ -172,7 +172,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");
}