You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user