summaryrefslogtreecommitdiffstats
path: root/src/render/materialsystem/shader_p.h
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-12-16 16:09:17 +0100
committerPaul Lemire <paul.lemire@kdab.com>2017-01-25 16:28:00 +0000
commit5578d5b89d06b502e05ef6b3e3c6ffa0c29a7aa7 (patch)
tree59483700526af2ab18f6af8980189a19e55ac34f /src/render/materialsystem/shader_p.h
parentfe8ba714347091a61d0b335d3413b49f8094dfd8 (diff)
ShaderProgram: store and send log and status to frontend
Change-Id: I00b02f8b73ecf1194b4c4db7b60a95ee7cc3df22 Task-number: QTBUG-57615 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/render/materialsystem/shader_p.h')
-rw-r--r--src/render/materialsystem/shader_p.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/render/materialsystem/shader_p.h b/src/render/materialsystem/shader_p.h
index a09133a74..625abe847 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::ShaderStatus 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::ShaderStatus m_status;
+
+ QVector<Qt3DCore::QPropertyUpdatedChangePtr> m_pendingNotifications;
void updateDNA();
@@ -158,6 +168,8 @@ private:
void initializeShaderStorageBlocks(const QVector<ShaderStorageBlock> &shaderStorageBlockDescription);
void initializeFromReference(const Shader &other);
+ void setLog(const QString &log);
+ void setStatus(QShaderProgram::ShaderStatus status);
friend class GraphicsContext;
};