diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /drivers/gles2/shader_compiler_gles2.h | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf180.tar.gz godot-5dbf180.tar.zst godot-5dbf180.zip | |
A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?
I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon
A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format
A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
Diffstat (limited to 'drivers/gles2/shader_compiler_gles2.h')
| -rw-r--r-- | drivers/gles2/shader_compiler_gles2.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/gles2/shader_compiler_gles2.h b/drivers/gles2/shader_compiler_gles2.h index 3c39e101c..2565adcd5 100644 --- a/drivers/gles2/shader_compiler_gles2.h +++ b/drivers/gles2/shader_compiler_gles2.h @@ -33,15 +33,15 @@ class ShaderCompilerGLES2 { class Uniform; + public: struct Flags; -private: +private: ShaderLanguage::ProgramNode *program_node; - String dump_node_code(ShaderLanguage::Node *p_node,int p_level,bool p_assign_left=false); + String dump_node_code(ShaderLanguage::Node *p_node, int p_level, bool p_assign_left = false); Error compile_node(ShaderLanguage::ProgramNode *p_program); - static Error create_glsl_120_code(void *p_str,ShaderLanguage::ProgramNode *p_program); - + static Error create_glsl_120_code(void *p_str, ShaderLanguage::ProgramNode *p_program); bool uses_light; bool uses_texscreen; @@ -87,7 +87,7 @@ private: StringName vname_world_vec; StringName vname_shadow; - Map<StringName,ShaderLanguage::Uniform> *uniforms; + Map<StringName, ShaderLanguage::Uniform> *uniforms; StringName out_vertex_name; @@ -95,13 +95,12 @@ private: String code; ShaderLanguage::ShaderType type; - String replace_string(const StringName& p_string); + String replace_string(const StringName &p_string); - Map<StringName,StringName> mode_replace_table[9]; - Map<StringName,StringName> replace_table; + Map<StringName, StringName> mode_replace_table[9]; + Map<StringName, StringName> replace_table; public: - struct Flags { bool uses_alpha; @@ -126,10 +125,9 @@ public: bool uses_shadow_color; }; - Error compile(const String& p_code, ShaderLanguage::ShaderType p_type, String& r_code_line, String& r_globals_line, Flags& r_flags, Map<StringName,ShaderLanguage::Uniform> *r_uniforms=NULL); + Error compile(const String &p_code, ShaderLanguage::ShaderType p_type, String &r_code_line, String &r_globals_line, Flags &r_flags, Map<StringName, ShaderLanguage::Uniform> *r_uniforms = NULL); ShaderCompilerGLES2(); - }; #endif // SHADER_COMPILERL_GL_H |
