summaryrefslogtreecommitdiffstats
path: root/src/render/materialsystem/shader_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/materialsystem/shader_p.h
parent59f8fec8a41606b3185fe3a4e276978e3e1ed5ef (diff)
parent939b9b4b7591e8a421cf048a0a84ed3e75d81d21 (diff)
Merge branch 'dev' into wip/animationwip/animation
Diffstat (limited to 'src/render/materialsystem/shader_p.h')
-rw-r--r--src/render/materialsystem/shader_p.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/render/materialsystem/shader_p.h b/src/render/materialsystem/shader_p.h
index ad68a3bd6..b5127f5ec 100644
--- a/src/render/materialsystem/shader_p.h
+++ b/src/render/materialsystem/shader_p.h
@@ -54,6 +54,8 @@
#include <Qt3DRender/private/backendnode_p.h>
#include <Qt3DRender/private/shaderparameterpack_p.h>
#include <Qt3DRender/private/shadervariables_p.h>
+#include <Qt3DRender/qshaderprogram.h>
+#include <Qt3DCore/qpropertyupdatedchange.h>
#include <QMutex>
#include <QVector>
@@ -63,8 +65,6 @@ class QOpenGLShaderProgram;
namespace Qt3DRender {
-class QShaderProgram;
-
namespace Render {
class ShaderManager;
@@ -118,6 +118,12 @@ public:
ShaderStorageBlock storageBlockForBlockNameId(int blockNameId);
ShaderStorageBlock storageBlockForBlockName(const QString &blockName);
+ inline QString log() const { return m_log; }
+ inline QShaderProgram::Status status() const { return m_status; }
+
+ void submitPendingNotifications();
+ inline bool hasPendingNotifications() const { return !m_pendingNotifications.empty(); }
+
private:
void initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change) Q_DECL_FINAL;
@@ -148,6 +154,10 @@ private:
mutable QMutex m_mutex;
GraphicsContext *m_graphicsContext;
QMetaObject::Connection m_contextConnection;
+ QString m_log;
+ QShaderProgram::Status m_status;
+
+ QVector<Qt3DCore::QPropertyUpdatedChangePtr> m_pendingNotifications;
void updateDNA();
@@ -157,7 +167,9 @@ private:
void initializeUniformBlocks(const QVector<ShaderUniformBlock> &uniformBlockDescription);
void initializeShaderStorageBlocks(const QVector<ShaderStorageBlock> &shaderStorageBlockDescription);
- void initialize(const Shader &other);
+ void initializeFromReference(const Shader &other);
+ void setLog(const QString &log);
+ void setStatus(QShaderProgram::Status status);
friend class GraphicsContext;
};