-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmdline_parser.h
More file actions
26 lines (23 loc) · 990 Bytes
/
cmdline_parser.h
File metadata and controls
26 lines (23 loc) · 990 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#pragma once
#include "common.h"
#include "scene.h"
struct MRT_Params {
uint32 windowWidth = 500;
uint32 windowHeight = 500;
uint32 bufferWidth = windowWidth;
uint32 bufferHeight = windowHeight;
uint32 samplesPerPixel = 128;
uint32 tileSize = 32;
uint32 numThreads = 0; // 0 == automatic
uint32 maxBounces = 32;
uint32 sceneSelect = SCENE_TRIANGLES;
uint32 threadingMode = 1; // use mode=0 and threads=1 for a deterministic runtime test
float maxLuminance = 1000; // luminance values can be clamped for faster convergence, but low values lead to bias
bool delay = false; // delayed start for recording
};
void ParseArgv(int argc, char** argv);
MRT_Params *getParams();
void PrintCmdLineHelp();
template<typename T>
int ReadParameter(int argc, char *argv[], const char *parameter, T *res_p, T min = std::numeric_limits<T>::min(), T max = std::numeric_limits<T>::max());
int CheckParameter(int argc, char *argv[], const char *parameter);