shocker-0x15 / GfxExp

Sandbox for graphics paper implementation
Other
228 stars 20 forks source link

m_isInitialized flag is not reset to false after RegularConstantContinuousDistribution1DTemplate::finalize() and RegularConstantContinuousDistribution2DTemplate::finalize() #15

Closed Hurleyworks closed 11 months ago

Hurleyworks commented 11 months ago

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!");
shocker-0x15 commented 11 months ago

Thanks for reporting!