mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-14 20:24:54 -04:00
--User changes
-Edits will not save back to the file in memory on render completion when preview renderer is running. --Bug fixes -dc_perlin was crashing on Nvidia when using SP. -Duplicate images were randomly getting added to the file in memory. -Crash when opening an Xml with less than 2 flames in it. --Code changes -Use raw array of floats in OpenCL for perlin noise, rather than float3/double3. -Add some default cases to dc_perlin. -Redo singleton pattern yet again. Deriving from a templated Singleton<T> class was creating a separate instance per module. Now only one instance of each type will ever be created and it will be wrapped in a shared_ptr which guarantees its deletion as main() exits.
This commit is contained in:
@ -879,7 +879,7 @@ public:
|
||||
bool Flatten(vector<string>& names)
|
||||
{
|
||||
bool shouldFlatten = true;
|
||||
VariationList<T>& vl(VariationList<T>::Instance());
|
||||
auto vl = VariationList<T>::Instance();
|
||||
|
||||
if (GetVariationById(eVariationId::VAR_FLATTEN) == nullptr)
|
||||
{
|
||||
@ -898,7 +898,7 @@ public:
|
||||
}
|
||||
|
||||
//Now traverse the parameters for this variation.
|
||||
if (ParametricVariation<T>* parVar = dynamic_cast<ParametricVariation<T>*>(var))//If any parametric variation parameter is present and non-zero, don't flatten.
|
||||
if (auto parVar = dynamic_cast<ParametricVariation<T>*>(var))//If any parametric variation parameter is present and non-zero, don't flatten.
|
||||
{
|
||||
for (auto& s : names)
|
||||
{
|
||||
@ -915,7 +915,7 @@ public:
|
||||
|
||||
if (shouldFlatten)//Flatten was not present and neither was any variation name or parameter in the list.
|
||||
{
|
||||
auto var = vl.GetVariationCopy(eVariationId::VAR_FLATTEN);
|
||||
auto var = vl->GetVariationCopy(eVariationId::VAR_FLATTEN);
|
||||
|
||||
if (AddVariation(var))
|
||||
{
|
||||
|
Reference in New Issue
Block a user