Shader/GlslWriter: Improve GLSL output

This commit is contained in:
Jérôme Leclercq
2021-04-13 17:20:31 +02:00
parent 3499c1f92f
commit bca1561f73
2 changed files with 318 additions and 265 deletions

View File

@@ -61,12 +61,16 @@ namespace Nz
void AppendCommentSection(const std::string& section);
void AppendEntryPoint(ShaderStageType shaderStage, ShaderAst::StatementPtr& shader);
void AppendField(std::size_t structIndex, const std::size_t* memberIndices, std::size_t remainingMembers);
void AppendHeader();
void AppendLine(const std::string& txt = {});
template<typename... Args> void AppendLine(Args&&... params);
void EnterScope();
void LeaveScope(bool skipLine = true);
void HandleEntryPoint(ShaderAst::DeclareFunctionStatement& node);
void HandleInOut();
void RegisterStruct(std::size_t structIndex, bool isStd140, ShaderAst::StructDescription desc);
void RegisterVariable(std::size_t varIndex, std::string varName);