summaryrefslogtreecommitdiffstats
path: root/src/render/materialsystem/shader_p.h
diff options
context:
space:
mode:
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;
};