Skip to content

Commit

Permalink
added argument support
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuodannychen committed Mar 6, 2023
1 parent 62e1cda commit 17adab0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
Binary file modified src/a.out
Binary file not shown.
Binary file removed src/main
Binary file not shown.
12 changes: 7 additions & 5 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

int main(int argc, char **argv) {
if (argc == 2) {
const char* filename = argv[1];
std::string filename = argv[1];
std::cout << "Processing file: " << filename << std::endl;
const char* mgedTops = "../../../../../build/bin/mged ../db/moss.g tops";
auto result1 = system(mgedTops);
const char* rtAll = "../../../../../build/bin/rt -C 255/255/255 -s 1024 -c \"set ambSamples=64\" ../db/moss.g all.g";
auto result2 = system(rtAll);

std::string genTops = "../../../../../build/bin/mged " + filename + " tops";
auto result1 = system(genTops.c_str());

std::string renderAll = "../../../../../build/bin/rt -C 255/255/255 -s 1024 -c \"set ambSamples=64\" " + filename + " all.g";
auto result2 = system(renderAll.c_str());
std::cout << "Success\n";
} else {
return 1;
Expand Down

0 comments on commit 17adab0

Please sign in to comment.