Rename RenderingServer global shader uniform methods to be more explicit

The `global_shader_uniform` name is longer, but it makes it much
easier to find the methods when searching in the class reference.
This commit is contained in:
Hugo Locurcio 2022-04-03 18:56:43 +02:00
parent 2e05cc3314
commit 4b42379c8f
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
45 changed files with 532 additions and 532 deletions

View file

@ -8277,7 +8277,7 @@ Error ShaderLanguage::_parse_shader(const HashMap<StringName, FunctionInfo> &p_f
if (is_uniform) {
if (uniform_scope == ShaderNode::Uniform::SCOPE_GLOBAL && Engine::get_singleton()->is_editor_hint()) { // Type checking for global uniforms is not allowed outside the editor.
//validate global uniform
DataType gvtype = global_var_get_type_func(name);
DataType gvtype = global_shader_uniform_get_type_func(name);
if (gvtype == TYPE_MAX) {
_set_error(vformat(RTR("Global uniform '%s' does not exist. Create it in Project Settings."), String(name)));
return ERR_PARSE_ERROR;
@ -9652,7 +9652,7 @@ Error ShaderLanguage::compile(const String &p_code, const ShaderCompileInfo &p_i
is_shader_inc = p_info.is_include;
code = p_code;
global_var_get_type_func = p_info.global_variable_type_func;
global_shader_uniform_get_type_func = p_info.global_shader_uniform_type_func;
varying_function_names = p_info.varying_function_names;
@ -9681,7 +9681,7 @@ Error ShaderLanguage::complete(const String &p_code, const ShaderCompileInfo &p_
varying_function_names = p_info.varying_function_names;
nodes = nullptr;
global_var_get_type_func = p_info.global_variable_type_func;
global_shader_uniform_get_type_func = p_info.global_shader_uniform_type_func;
shader = alloc_node<ShaderNode>();
_parse_shader(p_info.functions, p_info.render_modes, p_info.shader_types);