diff options
author | chai <chaifix@163.com> | 2021-10-31 19:37:06 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-31 19:37:06 +0800 |
commit | b972cec461f6c587edd8febbc6dad45bad65046d (patch) | |
tree | 006d5b6a05652c7c9670276c146fd27e98315311 /Runtime/Graphics/ShaderCompiler.h | |
parent | 98d05c5030ba1c35ddfe402790702b3f44c63134 (diff) |
*shader command parser
Diffstat (limited to 'Runtime/Graphics/ShaderCompiler.h')
-rw-r--r-- | Runtime/Graphics/ShaderCompiler.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Runtime/Graphics/ShaderCompiler.h b/Runtime/Graphics/ShaderCompiler.h index 56ddb45..891efb7 100644 --- a/Runtime/Graphics/ShaderCompiler.h +++ b/Runtime/Graphics/ShaderCompiler.h @@ -37,4 +37,19 @@ class GLSLCompiler public:
static void Compile(std::string& src, std::string& vsh, std::string& fsh, RenderCommandGroup& cmd)/*throw GLSLCompileException*/;
+private:
+ static std::string GetContent(std::string& src, const char* from, const char* to);
+ static std::string TrimContent(std::string& src, const char* from, const char* to);
+ static bool IsLabelActive(std::string& src, const char* label);
+
+ static void ParseCmd(std::string& cmd, RenderCommandGroup& group);
+ static bool IsCommandActive(std::string& src, const char* label);
+ static bool FindCmdPos(std::string& line, int* start, int* end);
+ static bool IsLineCommentd(std::string& line);
+ static void CommandCull(std::string& params, RenderCommandGroup& group);
+ static void CommandBlend(std::string& params, RenderCommandGroup& group);
+ static void CommandDepthTest(std::string& params, RenderCommandGroup& group);
+ static void CommandDepthWrite(std::string& params, RenderCommandGroup& group);
+ static void GetParams(const char* cmdName, std::string& params, std::string* out, int n);
+
};
|