summaryrefslogtreecommitdiffstats
path: root/src/render/backend/renderview_p.h
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-05-24 12:09:44 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-05-24 12:10:02 +0100
commit77d294db076dac19e8b549b445ffede9f7260c84 (patch)
tree828ee7a6862ec5c0bd24f97cb540625a2c647376 /src/render/backend/renderview_p.h
parent59f8fec8a41606b3185fe3a4e276978e3e1ed5ef (diff)
parent939b9b4b7591e8a421cf048a0a84ed3e75d81d21 (diff)
Merge branch 'dev' into wip/animationwip/animation
Diffstat (limited to 'src/render/backend/renderview_p.h')
-rw-r--r--src/render/backend/renderview_p.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/render/backend/renderview_p.h b/src/render/backend/renderview_p.h
index 1f00e2aae..440d51638 100644
--- a/src/render/backend/renderview_p.h
+++ b/src/render/backend/renderview_p.h
@@ -181,6 +181,9 @@ public:
inline void setViewport(const QRectF &vp) Q_DECL_NOTHROW { m_viewport = vp; }
inline QRectF viewport() const Q_DECL_NOTHROW { return m_viewport; }
+ inline float gamma() const Q_DECL_NOTHROW { return m_gamma; }
+ inline void setGamma(float gamma) Q_DECL_NOTHROW { m_gamma = gamma; }
+
// depth and stencil ClearBuffers are cached locally
// color ClearBuffers are collected, as there may be multiple
// color buffers to be cleared. we need to apply all these at rendering
@@ -212,14 +215,15 @@ 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();
inline void setRenderCaptureNodeId(const Qt3DCore::QNodeId nodeId) Q_DECL_NOTHROW { m_renderCaptureNodeId = nodeId; }
inline const Qt3DCore::QNodeId renderCaptureNodeId() const Q_DECL_NOTHROW { return m_renderCaptureNodeId; }
- void setMemoryBarrier(QMemoryBarrier::BarrierTypes barrier) Q_DECL_NOTHROW { m_memoryBarrier = barrier; }
- QMemoryBarrier::BarrierTypes memoryBarrier() const Q_DECL_NOTHROW { return m_memoryBarrier; }
+ void setMemoryBarrier(QMemoryBarrier::Operations barrier) Q_DECL_NOTHROW { m_memoryBarrier = barrier; }
+ QMemoryBarrier::Operations memoryBarrier() const Q_DECL_NOTHROW { return m_memoryBarrier; }
// Helps making the size of RenderView smaller
// Contains all the data needed for the actual building of the RenderView
@@ -245,13 +249,17 @@ public:
QVector3D m_eyePos;
};
+ bool isDownloadBuffersEnable() const;
+ void setIsDownloadBuffersEnable(bool isDownloadBuffersEnable);
+
private:
void setShaderAndUniforms(RenderCommand *command, RenderPass *pass, ParameterInfoList &parameters, const QMatrix4x4 &worldTransform,
- const QVector<LightSource> &activeLightSources) const;
+ const QVector<LightSource> &activeLightSources, EnvironmentLight *environmentLight) const;
mutable QThreadStorage<UniformBlockValueBuilder*> m_localData;
Qt3DCore::QNodeId m_renderCaptureNodeId;
+ bool m_isDownloadBuffersEnable;
Renderer *m_renderer;
NodeManagers *m_manager;
@@ -261,6 +269,7 @@ private:
InnerData m_data;
QRectF m_viewport;
+ float m_gamma;
Qt3DCore::QNodeId m_renderTarget;
QSurface *m_surface;
AttachmentPack m_attachmentPack;
@@ -274,13 +283,14 @@ private:
bool m_compute:1;
bool m_frustumCulling:1;
int m_workGroups[3];
- QMemoryBarrier::BarrierTypes m_memoryBarrier;
+ QMemoryBarrier::Operations m_memoryBarrier;
// We do not use pointers to RenderNodes or Drawable's here so that the
// render aspect is free to change the drawables on the next frame whilst
// 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;
@@ -303,6 +313,8 @@ private:
ViewportMatrix,
InverseViewportMatrix,
Time,
+ Exposure,
+ Gamma,
EyePosition
};