Fixed random seed when run in benchmark mode, use default random engine instead of fixed mersene twister

Refs #269
This commit is contained in:
saschawillems 2018-01-18 21:31:19 +01:00
parent 5790f30c17
commit 9e073bdd3b
11 changed files with 55 additions and 60 deletions

View file

@ -441,7 +441,7 @@ public:
std::vector<InstanceData> instanceData;
instanceData.resize(INSTANCE_COUNT);
std::mt19937 rndGenerator(benchmark.active ? 0 : (unsigned)time(NULL));
std::default_random_engine rndGenerator(benchmark.active ? 0 : (unsigned)time(nullptr));
std::uniform_real_distribution<float> uniformDist(0.0, 1.0);
std::uniform_int_distribution<uint32_t> rndTextureIndex(0, textures.rocks.layerCount);