summaryrefslogtreecommitdiffstats
path: root/src/render/backend/renderview_p.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-08-04 16:12:16 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-08-10 10:41:27 +0000
commite2e1a7986f92f76a2a2e79f911248de604af382f (patch)
tree46d18a7e9c6a574073742ba9aa76428624e854b6 /src/render/backend/renderview_p.h
parentc74ce04b4f3d25c21ccea6b836d30b4dbda2b6c0 (diff)
Extend standard uniforms to cover skinningPalette
This requires obtaining the skinning palette uniform from the entity. Up until now the standard uniforms only needed the entity's world transform. Now we need more, refactor the affected functions to pass in a pointer to the entity we are creating render commands for. Change-Id: Iba3c34159e798857682b9962266da1367ce9095c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/backend/renderview_p.h')
-rw-r--r--src/render/backend/renderview_p.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/render/backend/renderview_p.h b/src/render/backend/renderview_p.h
index 1f4a920c8..1674db0a5 100644
--- a/src/render/backend/renderview_p.h
+++ b/src/render/backend/renderview_p.h
@@ -261,8 +261,12 @@ public:
void setIsDownloadBuffersEnable(bool isDownloadBuffersEnable);
private:
- void setShaderAndUniforms(RenderCommand *command, RenderPass *pass, ParameterInfoList &parameters, const QMatrix4x4 &worldTransform,
- const QVector<LightSource> &activeLightSources, EnvironmentLight *environmentLight) const;
+ void setShaderAndUniforms(RenderCommand *command,
+ RenderPass *pass,
+ ParameterInfoList &parameters,
+ Entity *entity,
+ const QVector<LightSource> &activeLightSources,
+ EnvironmentLight *environmentLight) const;
mutable QThreadStorage<UniformBlockValueBuilder*> m_localData;
@@ -324,17 +328,24 @@ private:
Time,
Exposure,
Gamma,
- EyePosition
+ EyePosition,
+ SkinningPalette
};
typedef QHash<int, StandardUniform> StandardUniformsNameToTypeHash;
static StandardUniformsNameToTypeHash ms_standardUniformSetters;
static StandardUniformsNameToTypeHash initializeStandardUniformSetters();
- UniformValue standardUniformValue(StandardUniform standardUniformType, const QMatrix4x4 &model) const;
+ UniformValue standardUniformValue(StandardUniform standardUniformType,
+ Entity *entity,
+ const QMatrix4x4 &model) const;
void setUniformValue(ShaderParameterPack &uniformPack, int nameId, const UniformValue &value) const;
- void setStandardUniformValue(ShaderParameterPack &uniformPack, int glslNameId, int nameId, const QMatrix4x4 &worldTransform) const;
+ void setStandardUniformValue(ShaderParameterPack &uniformPack,
+ int glslNameId,
+ int nameId,
+ Entity *entity,
+ const QMatrix4x4 &worldTransform) const;
void setUniformBlockValue(ShaderParameterPack &uniformPack,
Shader *shader,
const ShaderUniformBlock &block,