diff options
author | Kevin Ottens <kevin.ottens@kdab.com> | 2017-02-23 16:12:34 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2017-02-24 16:59:07 +0000 |
commit | 98baac15388b536b5108cccc0cf3311c4d9d048c (patch) | |
tree | 78d591b96148a6ed04d6e8f94e0f578571453354 /src/render/backend/renderview_p.h | |
parent | e40572b9bcbf85c0c978c6234ecfd33354748525 (diff) |
RenderView: bind the found EnvironmentLight
If an EnvironmentLight is found, we bind its textures via the ShaderData
and also give a non null value to envLightCount, otherwise it gets a 0.
This new counter will be used in the shaders.
Change-Id: I4a5b61ddcf44d78cde3d500eea3654b6681296e8
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.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/render/backend/renderview_p.h b/src/render/backend/renderview_p.h index 5c0f5971a..440d51638 100644 --- a/src/render/backend/renderview_p.h +++ b/src/render/backend/renderview_p.h @@ -215,6 +215,7 @@ public: QSurface *surface() const { return m_surface; } void setLightSources(const QVector<LightSource> &lightSources) Q_DECL_NOTHROW { m_lightSources = lightSources; } + void setEnvironmentLight(EnvironmentLight *environmentLight) Q_DECL_NOTHROW { m_environmentLight = environmentLight; } void updateMatrices(); @@ -253,7 +254,7 @@ public: private: void setShaderAndUniforms(RenderCommand *command, RenderPass *pass, ParameterInfoList ¶meters, const QMatrix4x4 &worldTransform, - const QVector<LightSource> &activeLightSources) const; + const QVector<LightSource> &activeLightSources, EnvironmentLight *environmentLight) const; mutable QThreadStorage<UniformBlockValueBuilder*> m_localData; @@ -289,6 +290,7 @@ private: // the render thread is submitting these commands. QVector<RenderCommand *> m_commands; mutable QVector<LightSource> m_lightSources; + EnvironmentLight *m_environmentLight; QHash<Qt3DCore::QNodeId, QVector<RenderPassParameterData>> m_parameters; |