Hides high-level functions from GLES2 shader autocompletion
This commit is contained in:
parent
46820527de
commit
3473a195fc
1 changed files with 16 additions and 1 deletions
|
@ -5602,17 +5602,26 @@ Error ShaderLanguage::complete(const String &p_code, const Map<StringName, Funct
|
||||||
}
|
}
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
bool low_end = VisualServer::get_singleton()->is_low_end();
|
||||||
|
|
||||||
while (builtin_func_defs[idx].name) {
|
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);
|
matches.insert(String(builtin_func_defs[idx].name), ScriptCodeCompletionOption::KIND_FUNCTION);
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { // sub-class
|
} else { // sub-class
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
|
bool low_end = VisualServer::get_singleton()->is_low_end();
|
||||||
|
|
||||||
while (builtin_func_defs[idx].name) {
|
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) {
|
if (builtin_func_defs[idx].tag == completion_class) {
|
||||||
matches.insert(String(builtin_func_defs[idx].name), ScriptCodeCompletionOption::KIND_FUNCTION);
|
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;
|
int idx = 0;
|
||||||
|
|
||||||
String calltip;
|
String calltip;
|
||||||
|
bool low_end = VisualServer::get_singleton()->is_low_end();
|
||||||
|
|
||||||
while (builtin_func_defs[idx].name) {
|
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 (completion_function == builtin_func_defs[idx].name) {
|
||||||
|
|
||||||
if (builtin_func_defs[idx].tag != completion_class) {
|
if (builtin_func_defs[idx].tag != completion_class) {
|
||||||
|
|
Loading…
Reference in a new issue