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

@ -4563,9 +4563,9 @@ void VisualShaderEditor::_preview_size_changed() {
preview_vbox->set_custom_minimum_size(preview_window->get_size());
}
static ShaderLanguage::DataType _get_global_variable_type(const StringName &p_variable) {
RS::GlobalVariableType gvt = RS::get_singleton()->global_variable_get_type(p_variable);
return (ShaderLanguage::DataType)RS::global_variable_type_get_shader_datatype(gvt);
static ShaderLanguage::DataType _get_global_shader_uniform_type(const StringName &p_variable) {
RS::GlobalShaderUniformType gvt = RS::get_singleton()->global_shader_uniform_get_type(p_variable);
return (ShaderLanguage::DataType)RS::global_shader_uniform_type_get_shader_datatype(gvt);
}
void VisualShaderEditor::_update_preview() {
@ -4582,7 +4582,7 @@ void VisualShaderEditor::_update_preview() {
info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(visual_shader->get_mode()));
info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(visual_shader->get_mode()));
info.shader_types = ShaderTypes::get_singleton()->get_types();
info.global_variable_type_func = _get_global_variable_type;
info.global_shader_uniform_type_func = _get_global_shader_uniform_type;
ShaderLanguage sl;