ShaderNode: Add code output window

This commit is contained in:
Jérôme Leclercq
2021-01-14 22:02:34 +01:00
parent a037eef4c9
commit c8f4e53244
7 changed files with 245 additions and 107 deletions

View File

@@ -5,6 +5,7 @@
#include <Nazara/Core/Signal.hpp>
#include <Nazara/Utility/Enums.hpp>
#include <Nazara/Shader/ShaderAst.hpp>
#include <Nazara/Shader/ShaderNodes.hpp>
#include <nodes/FlowScene>
#include <ShaderNode/Enums.hpp>
@@ -66,7 +67,8 @@ class ShaderGraph
void Load(const QJsonObject& data);
QJsonObject Save();
Nz::ShaderNodes::StatementPtr ToAst();
Nz::ShaderNodes::StatementPtr ToAst() const;
Nz::ShaderAst ToShader() const;
Nz::ShaderExpressionType ToShaderExpressionType(const std::variant<PrimitiveType, std::size_t>& type) const;
void UpdateBuffer(std::size_t bufferIndex, std::string name, BufferType bufferType, std::size_t structIndex, std::size_t bindingIndex);
@@ -152,7 +154,7 @@ class ShaderGraph
private:
std::shared_ptr<QtNodes::DataModelRegistry> BuildRegistry();
QtNodes::FlowScene m_flowScene;
mutable QtNodes::FlowScene m_flowScene;
std::vector<BufferEntry> m_buffers;
std::vector<ConditionEntry> m_conditions;
std::vector<InputEntry> m_inputs;