CLIParser.h
branchv_0
changeset 6 fd93a46db15b
parent 5 ee4ba9f5a053
child 26 e7ceb915177e
--- a/CLIParser.h	Fri Dec 01 20:25:49 2023 +0100
+++ b/CLIParser.h	Fri Dec 01 21:02:02 2023 +0100
@@ -74,9 +74,7 @@
 			} else if (option == OPTION_SHADER) {
 				const auto type = readNext(arguments, i);
 				const auto file = readNext(arguments, i);
-				if (type == "fragment") c.fragmentShaders.push_back({file});
-				else if (type == "vertex") c.vertexShaders .push_back({file});
-				else throw std::invalid_argument("unsupported shader type");
+				c.shaders.push_back({file, type});
 			} else if (option == OPTION_BACKGROUND_COLOR) {
 				c.backgroundColor = parseHexColor(readNext(arguments, i));
 			} else if (option == OPTION_ROOT_WINDOW) {