1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-02 16:48:55 +00:00

Make compile shader function to use struct instead long parameter list

This commit is contained in:
Yuri Roubinsky
2021-08-08 08:04:20 +03:00
parent ff118d7a88
commit 76f6c0849c
7 changed files with 69 additions and 25 deletions

View File

@@ -346,7 +346,12 @@ MainLoop *test() {
Set<String> types;
types.insert("spatial");
Error err = sl.compile(code, dt, rm, ShaderLanguage::VaryingFunctionNames(), types, nullptr);
ShaderLanguage::ShaderCompileInfo info;
info.functions = dt;
info.render_modes = rm;
info.shader_types = types;
Error err = sl.compile(code, info);
if (err) {
print_line("Error at line: " + rtos(sl.get_error_line()) + ": " + sl.get_error_text());