|
7 | 7 |
|
8 | 8 | // Includes |
9 | 9 | #include "tools/command_line.h" |
| 10 | +#include "math/operators.h" |
| 11 | + |
| 12 | +// System includes |
| 13 | +#include <algorithm> |
10 | 14 |
|
11 | 15 | namespace command_line |
12 | 16 | { |
@@ -56,19 +60,52 @@ namespace command_line |
56 | 60 | commandLineOptions.enableCooperative = false; |
57 | 61 | current_arg_idx += 1; |
58 | 62 | } |
59 | | - else if (args[current_arg_idx] == "--enable-animation") |
| 63 | + else if (args[current_arg_idx] == "--disable-animation") |
60 | 64 | { |
61 | | - commandLineOptions.enableAnimation = true; |
| 65 | + commandLineOptions.disableAnimation = true; |
62 | 66 | current_arg_idx += 1; |
63 | 67 | } |
| 68 | + else if (args[current_arg_idx] == "--rendering-mode") |
| 69 | + { |
| 70 | + if (current_arg_idx == num_args - 1) |
| 71 | + { |
| 72 | + printf("Command line parser: please provide a rendering mode [0 = Material, 1 = GBuffer, 2 = Debug]."); |
| 73 | + continue; |
| 74 | + } |
| 75 | + commandLineOptions.renderingMode = (RenderingMode)clamp(atoi(args[current_arg_idx + 1].c_str()), 0, 2); |
| 76 | + current_arg_idx += 2; |
| 77 | + } |
| 78 | + else if (args[current_arg_idx] == "--texture-mode") |
| 79 | + { |
| 80 | + if (current_arg_idx == num_args - 1) |
| 81 | + { |
| 82 | + printf("Command line parser: please provide a texture mode ID [0 = Uncompressed, 1 = BC6, 2 = Neural]."); |
| 83 | + continue; |
| 84 | + } |
| 85 | + commandLineOptions.textureMode = (TextureMode)clamp(atoi(args[current_arg_idx + 1].c_str()), 0, 2); |
| 86 | + current_arg_idx += 2; |
| 87 | + } |
| 88 | + else if (args[current_arg_idx] == "--filtering-mode") |
| 89 | + { |
| 90 | + if (current_arg_idx == num_args - 1) |
| 91 | + { |
| 92 | + printf("Command line parser: please provide a filtering mode ID [0 = Nearest, 1 = Linear, 2 = Anisotropic]."); |
| 93 | + continue; |
| 94 | + } |
| 95 | + commandLineOptions.filteringMode = (FilteringMode)clamp(atoi(args[current_arg_idx + 1].c_str()), 0, 2); |
| 96 | + current_arg_idx += 2; |
| 97 | + } |
64 | 98 | else if (args[current_arg_idx] == "--help") |
65 | 99 | { |
66 | 100 | printf("Option list:\n"); |
67 | 101 | printf("--data-dir Location of the resource folders.\n"); |
68 | | - printf("--adapter-id Integer that allows to pick the desired GPU.\n"); |
| 102 | + printf("--adapter-id Integer that allows to pick the desired GPU [-1 = Largest VRAM, >= 0 System adapter ID].\n"); |
69 | 103 | printf("--poi Integer that allows to pick the initial camera location.\n"); |
70 | 104 | printf("--disable-coop Disable cooperative vector usage at launch.\n"); |
71 | | - printf("--enable-animation Enable mesh animation at launch.\n"); |
| 105 | + printf("--disable-animation Disable mesh animation at launch.\n"); |
| 106 | + printf("--rendering-mode Pick the rendering mode [0 = Material, 1 = GBuffer, 2 = Debug].\n"); |
| 107 | + printf("--texture-mode Pick the texture mode [0 = Uncompressed, 1 = BC6, 2 = Neural].\n"); |
| 108 | + printf("--filtering-mode Pick the filtering mode [0 = Nearest, 1 = Linear, 2 = Anisotropic].\n"); |
72 | 109 | return false; |
73 | 110 | } |
74 | 111 | else |
|
0 commit comments