1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

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.
This commit is contained in:
Hugo Locurcio
2019-10-26 17:41:47 +02:00
parent aa0fa6b14f
commit 701581d1d3
2 changed files with 20 additions and 11 deletions

View File

@@ -750,6 +750,8 @@ private:
Node *_parse_and_reduce_expression(BlockNode *p_block, const Map<StringName, BuiltInInfo> &p_builtin_types);
Error _parse_block(BlockNode *p_block, const Map<StringName, BuiltInInfo> &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<String> &p_shader_types) const;
Error _parse_shader(const Map<StringName, FunctionInfo> &p_functions, const Vector<StringName> &p_render_modes, const Set<String> &p_shader_types);
Error _find_last_flow_op_in_block(BlockNode *p_block, FlowOperation p_op);