Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
hashTable.resize(512) should be done after hashTable.clear(), otherwise the size of the hash table will be 0 after Clear is called. When pbrt is compiled as a library, this would lead to crash in multiple rendering passes.
hashTable.resize(512)
should be done afterhashTable.clear()
, otherwise the size of the hash table will be 0 afterClear
is called. When pbrt is compiled as a library, this would lead to crash in multiple rendering passes.