Shader: Add comments to surround modules
This commit is contained in:
@@ -519,6 +519,9 @@ namespace Nz::ShaderAst
|
||||
|
||||
inline bool Compare(const MultiStatement& lhs, const MultiStatement& rhs)
|
||||
{
|
||||
if (!Compare(lhs.sectionName, rhs.sectionName))
|
||||
return false;
|
||||
|
||||
if (!Compare(lhs.statements, rhs.statements))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -385,6 +385,7 @@ namespace Nz::ShaderAst
|
||||
NodeType GetType() const override;
|
||||
void Visit(AstStatementVisitor& visitor) override;
|
||||
|
||||
std::string sectionName;
|
||||
std::vector<StatementPtr> statements;
|
||||
};
|
||||
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace Nz
|
||||
void Append(const ShaderAst::VectorType& vecType);
|
||||
template<typename T> void Append(const T& param);
|
||||
template<typename T1, typename T2, typename... Args> void Append(const T1& firstParam, const T2& secondParam, Args&&... params);
|
||||
void AppendComment(const std::string& section);
|
||||
void AppendCommentSection(const std::string& section);
|
||||
void AppendFunctionDeclaration(const ShaderAst::DeclareFunctionStatement& node, bool forward = false);
|
||||
void AppendHeader();
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace Nz
|
||||
void AppendAttribute(LocationAttribute location);
|
||||
void AppendAttribute(SetAttribute set);
|
||||
void AppendAttribute(UnrollAttribute unroll);
|
||||
void AppendComment(const std::string& section);
|
||||
void AppendCommentSection(const std::string& section);
|
||||
void AppendHeader();
|
||||
void AppendLine(const std::string& txt = {});
|
||||
|
||||
Reference in New Issue
Block a user