Add autocompletion for RenderingServer's global shader & has_os_feature
This commit is contained in:
parent
179dfdc8d7
commit
472e3b3ad5
|
@ -2204,6 +2204,25 @@ void RenderingServer::fix_surface_compatibility(SurfaceData &p_surface, const St
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
void RenderingServer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
|
||||||
|
String pf = p_function;
|
||||||
|
if (p_idx == 0) {
|
||||||
|
if (pf == "global_shader_parameter_set" || pf == "global_shader_parameter_set_override" ||
|
||||||
|
pf == "global_shader_parameter_get" || pf == "global_shader_parameter_get_type" || pf == "global_shader_parameter_remove") {
|
||||||
|
for (StringName E : global_shader_parameter_get_list()) {
|
||||||
|
r_options->push_back(E.operator String().quote());
|
||||||
|
}
|
||||||
|
} else if (pf == "has_os_feature") {
|
||||||
|
for (String E : { "\"rgtc\"", "\"s3tc\"", "\"bptc\"", "\"etc\"", "\"etc2\"", "\"astc\"" }) {
|
||||||
|
r_options->push_back(E);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Object::get_argument_options(p_function, p_idx, r_options);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void RenderingServer::_bind_methods() {
|
void RenderingServer::_bind_methods() {
|
||||||
BIND_CONSTANT(NO_INDEX_ARRAY);
|
BIND_CONSTANT(NO_INDEX_ARRAY);
|
||||||
BIND_CONSTANT(ARRAY_WEIGHTS_SIZE);
|
BIND_CONSTANT(ARRAY_WEIGHTS_SIZE);
|
||||||
|
|
|
@ -1639,6 +1639,10 @@ public:
|
||||||
|
|
||||||
virtual void call_on_render_thread(const Callable &p_callable) = 0;
|
virtual void call_on_render_thread(const Callable &p_callable) = 0;
|
||||||
|
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
|
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
|
||||||
|
#endif
|
||||||
|
|
||||||
RenderingServer();
|
RenderingServer();
|
||||||
virtual ~RenderingServer();
|
virtual ~RenderingServer();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue