diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-01-23 11:18:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-23 11:18:46 +0100 |
commit | e7947c81d6a84949d1a3d261c9599cb746160c85 (patch) | |
tree | 42b4141afa6b8fdbdfdc50a27c3147c7c9e7319d | |
parent | 46820527dea1fb238edbc1137f3173750e053ece (diff) | |
parent | 3473a195fcf07646afdd24d635c1e616912d007c (diff) |
Merge pull request #35463 from Chaosus/shader_gles2_completion
Hides high-level functions from GLES2 shader autocompletion
-rw-r--r-- | servers/visual/shader_language.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 988e0a8522..d3ecdf4e59 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -5602,17 +5602,26 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Funct } int idx = 0; + bool low_end = VisualServer::get_singleton()->is_low_end(); while (builtin_func_defs[idx].name) { - + if (low_end && builtin_func_defs[idx].high_end) { + idx++; + continue; + } matches.insert(String(builtin_func_defs[idx].name), ScriptCodeCompletionOption::KIND_FUNCTION); idx++; } } else { // sub-class int idx = 0; + bool low_end = VisualServer::get_singleton()->is_low_end(); while (builtin_func_defs[idx].name) { + if (low_end && builtin_func_defs[idx].high_end) { + idx++; + continue; + } if (builtin_func_defs[idx].tag == completion_class) { matches.insert(String(builtin_func_defs[idx].name), ScriptCodeCompletionOption::KIND_FUNCTION); } @@ -5676,9 +5685,15 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Funct int idx = 0; String calltip; + bool low_end = VisualServer::get_singleton()->is_low_end(); while (builtin_func_defs[idx].name) { + if (low_end && builtin_func_defs[idx].high_end) { + idx++; + continue; + } + if (completion_function == builtin_func_defs[idx].name) { if (builtin_func_defs[idx].tag != completion_class) { |