summaryrefslogtreecommitdiffstats
path: root/src/render/backend/quniformvalue.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/backend/quniformvalue.cpp')
-rw-r--r--src/render/backend/quniformvalue.cpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/src/render/backend/quniformvalue.cpp b/src/render/backend/quniformvalue.cpp
index 09327c213..b7eaf2023 100644
--- a/src/render/backend/quniformvalue.cpp
+++ b/src/render/backend/quniformvalue.cpp
@@ -55,42 +55,12 @@ QT_BEGIN_NAMESPACE
namespace Qt3DRender {
namespace Render {
-void QUniformValue::apply(GraphicsContext *ctx, const ShaderUniform &description) const
-{
- switch (m_type) {
- case Value:
- ctx->bindUniform(m_var, description);
- break;
-
- case TextureSampler:
- // We assume that the texture has been successfully bound and attache to a texture unit
- if (m_textureIdUnit.m_textureUnit != -1) {
- ctx->bindUniform(m_textureIdUnit.m_textureUnit, description);
-#if defined(QT3D_RENDER_ASPECT_OPENGL_DEBUG)
- int err = ctx->openGLContext()->functions()->glGetError();
- if (err) {
- qCWarning(Render::Backend, "Error %d after setting uniform \"%s\" at location %d",
- err, qUtf8Printable(description.m_name), description.m_location);
- }
-#endif
- } else {
- qCWarning(Render::Backend, "Invalid texture unit supplied for \"%s\"",
- qUtf8Printable(description.m_nameId));
- }
- break;
-
- default:
- break;
- }
-}
-
-
ShaderParameterPack::~ShaderParameterPack()
{
m_uniforms.clear();
}
-void ShaderParameterPack::setUniform(const int glslNameId, const QUniformValue &val)
+void ShaderParameterPack::setUniform(const int glslNameId, const UniformValue &val)
{
m_uniforms.insert(glslNameId, val);
}