| 94 | TutorialApplication* TutorialApplication::instance = nullptr; |
| 95 | |
| 96 | TutorialApplication::TutorialApplication (const std::string& tutorialName, int features, int w, int h) |
| 97 | |
| 98 | : Application(features), |
| 99 | tutorialName(tutorialName), |
| 100 | |
| 101 | width(w), |
| 102 | height(h), |
| 103 | pixels(nullptr), |
| 104 | |
| 105 | outputImageFilename(""), |
| 106 | referenceImageFilename(""), |
| 107 | referenceImageThreshold(35.0f), |
| 108 | |
| 109 | interactive(true), |
| 110 | fullscreen(false), |
| 111 | |
| 112 | window_width(1024), |
| 113 | window_height(1024), |
| 114 | |
| 115 | time0(getSeconds()), |
| 116 | debug_int0(0), |
| 117 | debug_int1(0), |
| 118 | |
| 119 | mouseMode(0), |
| 120 | clickX(0.0), clickY(0.0), |
| 121 | speed(1.0f), |
| 122 | moveDelta(zero), |
| 123 | |
| 124 | animate(true), |
| 125 | render_time(0.f), |
| 126 | |
| 127 | command_line_camera(false), |
| 128 | print_frame_rate(false), |
| 129 | avg_render_time(64,1.0), |
| 130 | avg_frame_time(64,1.0), |
| 131 | avg_mrayps(64,1.0), |
| 132 | print_camera(false), |
| 133 | |
| 134 | debug0(0), |
| 135 | debug1(0), |
| 136 | debug2(0), |
| 137 | debug3(0), |
| 138 | |
| 139 | iflags_coherent(RTC_RAY_QUERY_FLAG_COHERENT), |
| 140 | iflags_incoherent(RTC_RAY_QUERY_FLAG_INCOHERENT) |
| 141 | { |
| 142 | /* only a single instance of this class is supported */ |
| 143 | assert(instance == nullptr); |
| 144 | instance = this; |
| 145 | |
| 146 | /* for best performance set FTZ and DAZ flags in MXCSR control and status register */ |
| 147 | _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON); |
| 148 | _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON); |
| 149 | |
| 150 | registerOption("c", [this] (Ref<ParseStream> cin, const FileName& path) { |
| 151 | FileName file = path + cin->getFileName(); |
| 152 | parseCommandLine(new ParseStream(new LineCommentFilter(file, "#")), file.path()); |
| 153 | }, "-c <filename>: parses command line option from <filename>"); |
nothing calls this directly
no test coverage detected