m_isInitialized flag is not reset to false after RegularConstantContinuousDistribution1DTemplate::finalize() and RegularConstantContinuousDistribution2DTemplate::finalize() #15
My project allows user to interactively change HDR environment image so I need to initialize and finalize the
RegularConstantContinuousDistribution2D envLightImportanceMap each time a new environment hdr is selected. Currently the finalize() functions do not reset the m_isInitialized flag to false, so I hit this assert when I try to initialize the envLightImportanceMap a second time.
// Assert that we're not already initialized
Assert (!m_isInitialized, "Already initialized!");
My project allows user to interactively change HDR environment image so I need to initialize and finalize the RegularConstantContinuousDistribution2D envLightImportanceMap each time a new environment hdr is selected. Currently the finalize() functions do not reset the m_isInitialized flag to false, so I hit this assert when I try to initialize the envLightImportanceMap a second time.