From 701581d1d3a48abb0ac9afb4874c4c591dade7cc Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 26 Oct 2019 17:41:47 +0200 Subject: Improve error messages related to `shader_type` The list of allowed shader types is now displayed if any `shader_type`-related error is emitted. This makes it easier to remember which shader types are allowed when creating a new shader. --- servers/visual/shader_language.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'servers/visual/shader_language.h') diff --git a/servers/visual/shader_language.h b/servers/visual/shader_language.h index 3a5630ef42..ceeaaf8872 100644 --- a/servers/visual/shader_language.h +++ b/servers/visual/shader_language.h @@ -750,6 +750,8 @@ private: Node *_parse_and_reduce_expression(BlockNode *p_block, const Map &p_builtin_types); Error _parse_block(BlockNode *p_block, const Map &p_builtin_types, bool p_just_one = false, bool p_can_break = false, bool p_can_continue = false); + String _get_shader_type_list(const Set &p_shader_types) const; + Error _parse_shader(const Map &p_functions, const Vector &p_render_modes, const Set &p_shader_types); Error _find_last_flow_op_in_block(BlockNode *p_block, FlowOperation p_op); -- cgit v1.2.3