File tree Expand file tree Collapse file tree 1 file changed +52
-1
lines changed Expand file tree Collapse file tree 1 file changed +52
-1
lines changed Original file line number Diff line number Diff line change 1- // TODO: Cypi
1+ // TODO: Cypi
2+
3+
4+ // nsc input/simple_shader.hlsl -T ps_6_0 -E Main -Fo output/shader.ps
5+
6+ #include < iostream>
7+ #include < cstdlib>
8+ #include < vector>
9+
10+
11+ bool no_nbl_builtins;
12+
13+
14+ bool noNblBuiltinsEnabled (const std::vector<std::string>& args)
15+ {
16+ for (auto i=0 ; i<args.size (); i++)
17+ {
18+ if (args[i] == " -no-nbl-builtins" )
19+ return true ;
20+ }
21+ return false ;
22+ }
23+
24+
25+
26+ int main (int argc, char * argv[])
27+ {
28+ // std::cout << "\n\t\t:: ::\n";
29+ // std::cout << "\tNABLA SHADER COMPILER";
30+ // std::cout << "\n\t\t:: ::\n\n";
31+
32+
33+ std::vector<std::string> arguments (argv + 1 , argv + argc);
34+
35+ no_nbl_builtins = noNblBuiltinsEnabled (arguments);
36+
37+ std::string command = " dxc.exe" ;
38+ for (std::string arg : arguments)
39+ {
40+ command.append (" " ).append (arg);
41+ }
42+
43+ int execute = std::system (command.c_str ());
44+
45+ std::string flag_set = no_nbl_builtins ? " TRUE" : " FALSE" ;
46+
47+ std::cout << " -no-nbl-builtins - " << flag_set;
48+
49+
50+ std::cout << " \n\n\n\n PRESS ENTER TO EXIT(): " ;
51+ std::cin.get ();
52+ }
You can’t perform that action at this time.
0 commit comments