summaryrefslogtreecommitdiff
path: root/drivers/gles3/shader_compiler_gles3.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /drivers/gles3/shader_compiler_gles3.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
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/gles3/shader_compiler_gles3.h')
-rw-r--r--drivers/gles3/shader_compiler_gles3.h29
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/gles3/shader_compiler_gles3.h b/drivers/gles3/shader_compiler_gles3.h
index bbdfc7865f..44d6b3a349 100644
--- a/drivers/gles3/shader_compiler_gles3.h
+++ b/drivers/gles3/shader_compiler_gles3.h
@@ -29,20 +29,20 @@
#ifndef SHADERCOMPILERGLES3_H
#define SHADERCOMPILERGLES3_H
+#include "pair.h"
#include "servers/visual/shader_language.h"
#include "servers/visual/shader_types.h"
#include "servers/visual_server.h"
-#include "pair.h"
class ShaderCompilerGLES3 {
public:
struct IdentifierActions {
- Map<StringName,Pair<int*,int> > render_mode_values;
- Map<StringName,bool*> render_mode_flags;
- Map<StringName,bool*> usage_flag_pointers;
+ Map<StringName, Pair<int *, int> > render_mode_values;
+ Map<StringName, bool *> render_mode_flags;
+ Map<StringName, bool *> usage_flag_pointers;
- Map<StringName,ShaderLanguage::ShaderNode::Uniform> *uniforms;
+ Map<StringName, ShaderLanguage::ShaderNode::Uniform> *uniforms;
};
struct GeneratedCode {
@@ -62,23 +62,20 @@ public:
bool uses_fragment_time;
bool uses_vertex_time;
-
};
private:
-
ShaderLanguage parser;
struct DefaultIdentifierActions {
- Map<StringName,String> renames;
- Map<StringName,String> render_mode_defines;
- Map<StringName,String> usage_defines;
+ Map<StringName, String> renames;
+ Map<StringName, String> render_mode_defines;
+ Map<StringName, String> usage_defines;
};
- void _dump_function_deps(ShaderLanguage::ShaderNode *p_node, const StringName& p_for_func, const Map<StringName, String> &p_func_code, String& r_to_add,Set<StringName> &added);
- String _dump_node_code(ShaderLanguage::Node *p_node, int p_level, GeneratedCode &r_gen_code, IdentifierActions& p_actions, const DefaultIdentifierActions& p_default_actions);
-
+ void _dump_function_deps(ShaderLanguage::ShaderNode *p_node, const StringName &p_for_func, const Map<StringName, String> &p_func_code, String &r_to_add, Set<StringName> &added);
+ String _dump_node_code(ShaderLanguage::Node *p_node, int p_level, GeneratedCode &r_gen_code, IdentifierActions &p_actions, const DefaultIdentifierActions &p_default_actions);
StringName current_func_name;
StringName vertex_name;
@@ -90,14 +87,10 @@ private:
Set<StringName> used_rmode_defines;
Set<StringName> internal_functions;
-
DefaultIdentifierActions actions[VS::SHADER_MAX];
public:
-
-
- Error compile(VS::ShaderMode p_mode, const String& p_code, IdentifierActions* p_actions, const String& p_path, GeneratedCode& r_gen_code);
-
+ Error compile(VS::ShaderMode p_mode, const String &p_code, IdentifierActions *p_actions, const String &p_path, GeneratedCode &r_gen_code);
ShaderCompilerGLES3();
};