mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-04-19 09:21:42 -04:00
Linux build.
This commit is contained in:
parent
330074cfb2
commit
5e82167155
@ -51,6 +51,7 @@ HEADERS += \
|
|||||||
../../../Source/Ember/Variations03.h \
|
../../../Source/Ember/Variations03.h \
|
||||||
../../../Source/Ember/Variations04.h \
|
../../../Source/Ember/Variations04.h \
|
||||||
../../../Source/Ember/Variations05.h \
|
../../../Source/Ember/Variations05.h \
|
||||||
|
../../../Source/Ember/Variations06.h \
|
||||||
../../../Source/Ember/VariationsDC.h \
|
../../../Source/Ember/VariationsDC.h \
|
||||||
../../../Source/Ember/Xform.h \
|
../../../Source/Ember/Xform.h \
|
||||||
../../../Source/Ember/XmlToEmber.h \
|
../../../Source/Ember/XmlToEmber.h \
|
||||||
|
@ -18,6 +18,7 @@ SOURCES += \
|
|||||||
../../../Source/EmberCL/DllMain.cpp \
|
../../../Source/EmberCL/DllMain.cpp \
|
||||||
../../../Source/EmberCL/DEOpenCLKernelCreator.cpp \
|
../../../Source/EmberCL/DEOpenCLKernelCreator.cpp \
|
||||||
../../../Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp \
|
../../../Source/EmberCL/FinalAccumOpenCLKernelCreator.cpp \
|
||||||
|
../../../Source/EmberCL/FunctionMapper.cpp \
|
||||||
../../../Source/EmberCL/IterOpenCLKernelCreator.cpp \
|
../../../Source/EmberCL/IterOpenCLKernelCreator.cpp \
|
||||||
../../../Source/EmberCL/OpenCLInfo.cpp \
|
../../../Source/EmberCL/OpenCLInfo.cpp \
|
||||||
../../../Source/EmberCL/OpenCLWrapper.cpp \
|
../../../Source/EmberCL/OpenCLWrapper.cpp \
|
||||||
@ -33,6 +34,7 @@ HEADERS += \
|
|||||||
../../../Source/EmberCL/EmberCLPch.h \
|
../../../Source/EmberCL/EmberCLPch.h \
|
||||||
../../../Source/EmberCL/EmberCLStructs.h \
|
../../../Source/EmberCL/EmberCLStructs.h \
|
||||||
../../../Source/EmberCL/FinalAccumOpenCLKernelCreator.h \
|
../../../Source/EmberCL/FinalAccumOpenCLKernelCreator.h \
|
||||||
|
../../../Source/EmberCL/FunctionMapper.h \
|
||||||
../../../Source/EmberCL/IterOpenCLKernelCreator.h \
|
../../../Source/EmberCL/IterOpenCLKernelCreator.h \
|
||||||
../../../Source/EmberCL/OpenCLInfo.h \
|
../../../Source/EmberCL/OpenCLInfo.h \
|
||||||
../../../Source/EmberCL/OpenCLWrapper.h \
|
../../../Source/EmberCL/OpenCLWrapper.h \
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
namespace EmberNs
|
namespace EmberNs
|
||||||
{
|
{
|
||||||
template<> unique_ptr<QTIsaac<ISAAC_SIZE, ISAAC_INT>> QTIsaac<ISAAC_SIZE, ISAAC_INT>::GlobalRand = unique_ptr<QTIsaac<ISAAC_SIZE, ISAAC_INT>>(new QTIsaac<ISAAC_SIZE, ISAAC_INT>());
|
template<> unique_ptr<QTIsaac<ISAAC_SIZE, ISAAC_INT>> QTIsaac<ISAAC_SIZE, ISAAC_INT>::GlobalRand = unique_ptr<QTIsaac<ISAAC_SIZE, ISAAC_INT>>(new QTIsaac<ISAAC_SIZE, ISAAC_INT>());
|
||||||
CriticalSection QTIsaac<ISAAC_SIZE, ISAAC_INT>::m_CS;
|
template<> CriticalSection QTIsaac<ISAAC_SIZE, ISAAC_INT>::m_CS = CriticalSection();
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "Curves.h"
|
#include "Curves.h"
|
||||||
|
@ -31,11 +31,11 @@
|
|||||||
#if defined(__APPLE__) || defined(_MSC_VER)
|
#if defined(__APPLE__) || defined(_MSC_VER)
|
||||||
#define sincos(x, s, c) *(s)=std::sin(x); *(c)=std::cos(x);
|
#define sincos(x, s, c) *(s)=std::sin(x); *(c)=std::cos(x);
|
||||||
#else
|
#else
|
||||||
/*static void sincos(float x, float* s, float* c)
|
static void sincos(float x, float* s, float* c)
|
||||||
{
|
{
|
||||||
*s = std::sin(x);
|
*s = std::sin(x);
|
||||||
*c = std::cos(x);
|
*c = std::cos(x);
|
||||||
}*/
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace EmberNs
|
namespace EmberNs
|
||||||
|
@ -840,7 +840,6 @@ eRenderStatus Renderer<T, bucketT>::LogScaleDensityFilter(bool forceOutput)
|
|||||||
{
|
{
|
||||||
size_t startRow = 0;
|
size_t startRow = 0;
|
||||||
size_t endRow = m_SuperRasH;
|
size_t endRow = m_SuperRasH;
|
||||||
size_t startCol = 0;
|
|
||||||
size_t endCol = m_SuperRasW;
|
size_t endCol = m_SuperRasW;
|
||||||
//Timing t(4);
|
//Timing t(4);
|
||||||
|
|
||||||
|
@ -1690,6 +1690,20 @@ private:
|
|||||||
bool m_IsState;//Whether the parameter changes state between iterations. This is also considered precalc.
|
bool m_IsState;//Whether the parameter changes state between iterations. This is also considered precalc.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define VARUSINGS \
|
||||||
|
using Variation<T>::m_Weight; \
|
||||||
|
using Variation<T>::m_Xform; \
|
||||||
|
using Variation<T>::m_VariationId; \
|
||||||
|
using Variation<T>::m_Name; \
|
||||||
|
using Variation<T>::m_VarType; \
|
||||||
|
using Variation<T>::m_AssignType; \
|
||||||
|
using Variation<T>::SetType; \
|
||||||
|
using Variation<T>::IndexInXform; \
|
||||||
|
using Variation<T>::XformIndexInEmber; \
|
||||||
|
using Variation<T>::Prefix; \
|
||||||
|
using Variation<T>::Precalc; \
|
||||||
|
using Variation<T>::StateOpenCLString;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parametric variations use parameters in addition to weight.
|
/// Parametric variations use parameters in addition to weight.
|
||||||
/// These values are stored in members of derived classes, however
|
/// These values are stored in members of derived classes, however
|
||||||
@ -1700,9 +1714,9 @@ private:
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
class EMBER_API ParametricVariation : public Variation<T>
|
class EMBER_API ParametricVariation : public Variation<T>
|
||||||
{
|
{
|
||||||
using Variation<T>::Precalc;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
VARUSINGS
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor which takes arguments and just passes them to the base class.
|
/// Constructor which takes arguments and just passes them to the base class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -1990,18 +2004,6 @@ protected:
|
|||||||
/// Defining assignment operators isn't really needed because Variations are always held as pointers.
|
/// Defining assignment operators isn't really needed because Variations are always held as pointers.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
||||||
#define VARUSINGS \
|
|
||||||
using Variation<T>::m_Weight; \
|
|
||||||
using Variation<T>::m_Xform; \
|
|
||||||
using Variation<T>::m_VariationId; \
|
|
||||||
using Variation<T>::m_Name; \
|
|
||||||
using Variation<T>::m_VarType; \
|
|
||||||
using Variation<T>::m_AssignType; \
|
|
||||||
using Variation<T>::SetType; \
|
|
||||||
using Variation<T>::IndexInXform; \
|
|
||||||
using Variation<T>::XformIndexInEmber; \
|
|
||||||
using Variation<T>::Prefix;
|
|
||||||
|
|
||||||
#ifdef DO_DOUBLE
|
#ifdef DO_DOUBLE
|
||||||
#define VARCOPYDOUBLE(name) \
|
#define VARCOPYDOUBLE(name) \
|
||||||
virtual void Copy(Variation<double>*& var) const override \
|
virtual void Copy(Variation<double>*& var) const override \
|
||||||
|
@ -3724,7 +3724,6 @@ public:
|
|||||||
virtual string StateInitOpenCLString() const override
|
virtual string StateInitOpenCLString() const override
|
||||||
{
|
{
|
||||||
ostringstream ss, ss2;
|
ostringstream ss, ss2;
|
||||||
intmax_t i = 0;
|
|
||||||
ss2 << "_" << XformIndexInEmber();
|
ss2 << "_" << XformIndexInEmber();
|
||||||
string stateIndex = ss2.str();
|
string stateIndex = ss2.str();
|
||||||
string prefix = Prefix();
|
string prefix = Prefix();
|
||||||
@ -4151,7 +4150,6 @@ public:
|
|||||||
virtual string StateInitOpenCLString() const override
|
virtual string StateInitOpenCLString() const override
|
||||||
{
|
{
|
||||||
ostringstream ss, ss2;
|
ostringstream ss, ss2;
|
||||||
intmax_t i = 0;
|
|
||||||
ss2 << "_" << XformIndexInEmber();
|
ss2 << "_" << XformIndexInEmber();
|
||||||
string stateIndex = ss2.str();
|
string stateIndex = ss2.str();
|
||||||
string prefix = Prefix();
|
string prefix = Prefix();
|
||||||
|
@ -508,7 +508,7 @@ public:
|
|||||||
virtual string OpenCLString() const override
|
virtual string OpenCLString() const override
|
||||||
{
|
{
|
||||||
ostringstream ss, ss2;
|
ostringstream ss, ss2;
|
||||||
intmax_t i = 0, varIndex = IndexInXform();
|
intmax_t i = 0;
|
||||||
ss2 << "_" << XformIndexInEmber() << "]";
|
ss2 << "_" << XformIndexInEmber() << "]";
|
||||||
string index = ss2.str();
|
string index = ss2.str();
|
||||||
string numEdges = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
string numEdges = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||||
@ -1724,7 +1724,7 @@ public:
|
|||||||
virtual string OpenCLString() const override
|
virtual string OpenCLString() const override
|
||||||
{
|
{
|
||||||
ostringstream ss, ss2;
|
ostringstream ss, ss2;
|
||||||
intmax_t i = 0, varIndex = IndexInXform();
|
intmax_t i = 0;
|
||||||
ss2 << "_" << XformIndexInEmber() << "]";
|
ss2 << "_" << XformIndexInEmber() << "]";
|
||||||
string index = ss2.str();
|
string index = ss2.str();
|
||||||
string top = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
string top = "parVars[" + ToUpper(m_Params[i++].Name()) + index;
|
||||||
@ -2881,7 +2881,7 @@ public:
|
|||||||
radius = helper.m_PrecalcSqrtSumSquares;
|
radius = helper.m_PrecalcSqrtSumSquares;
|
||||||
theta = helper.m_PrecalcAtanxy;
|
theta = helper.m_PrecalcAtanxy;
|
||||||
mu = Zeps<T>(SQR(m_SynthPower));
|
mu = Zeps<T>(SQR(m_SynthPower));
|
||||||
radius += -2 * mu * (int)((radius + mu) / (2 * mu)) + radius * (1 - mu);
|
radius += -2 * mu * int((radius + mu) / (2 * mu)) + radius * (1 - mu);
|
||||||
|
|
||||||
SynthSinCos(synth, radius, s, c, synthMode);
|
SynthSinCos(synth, radius, s, c, synthMode);
|
||||||
|
|
||||||
@ -2935,6 +2935,7 @@ public:
|
|||||||
helper.Out.y = m_Weight * radius * c;
|
helper.Out.y = m_Weight * radius * c;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
case MODE_SHIFTTHETA: // Power YES, Smooth NO
|
case MODE_SHIFTTHETA: // Power YES, Smooth NO
|
||||||
// Use (adjusted) radius to move point around circle
|
// Use (adjusted) radius to move point around circle
|
||||||
Vx = helper.In.x;
|
Vx = helper.In.x;
|
||||||
@ -3639,6 +3640,7 @@ private:
|
|||||||
y *= M_2PI / frq;
|
y *= M_2PI / frq;
|
||||||
x = 1 / Zeps<T>(std::cos(y)) - 1;
|
x = 1 / Zeps<T>(std::cos(y)) - 1;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
case WAVE_INGON:
|
case WAVE_INGON:
|
||||||
y -= T(0.5);
|
y -= T(0.5);
|
||||||
y *= M_2PI / frq;
|
y *= M_2PI / frq;
|
||||||
@ -3659,6 +3661,7 @@ private:
|
|||||||
z = synthA + synth * x;
|
z = synthA + synth * x;
|
||||||
thetaFactor = (thetaFactor > z ? thetaFactor : z);
|
thetaFactor = (thetaFactor > z ? thetaFactor : z);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
case LAYER_MIN:
|
case LAYER_MIN:
|
||||||
z = synthA + synth * x;
|
z = synthA + synth * x;
|
||||||
thetaFactor = (thetaFactor < z ? thetaFactor : z);
|
thetaFactor = (thetaFactor < z ? thetaFactor : z);
|
||||||
@ -3760,6 +3763,7 @@ private:
|
|||||||
{
|
{
|
||||||
case LERP_LINEAR:
|
case LERP_LINEAR:
|
||||||
return x * m;
|
return x * m;
|
||||||
|
default:
|
||||||
case LERP_BEZIER:
|
case LERP_BEZIER:
|
||||||
return BezierQuadMap(x, m);
|
return BezierQuadMap(x, m);
|
||||||
}
|
}
|
||||||
@ -3777,6 +3781,7 @@ private:
|
|||||||
s = s * SynthValue(synth, theta);
|
s = s * SynthValue(synth, theta);
|
||||||
c = c * SynthValue(synth, theta + T(M_PI) / 2);
|
c = c * SynthValue(synth, theta + T(M_PI) / 2);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
case SINCOS_MIXIN:
|
case SINCOS_MIXIN:
|
||||||
s = (1 - m_SynthMix) * s + (SynthValue(synth, theta) - 1);
|
s = (1 - m_SynthMix) * s + (SynthValue(synth, theta) - 1);
|
||||||
c = (1 - m_SynthMix) * c + (SynthValue(synth, theta + T(M_PI) / 2) - 1);
|
c = (1 - m_SynthMix) * c + (SynthValue(synth, theta + T(M_PI) / 2) - 1);
|
||||||
|
@ -1366,7 +1366,7 @@ private:
|
|||||||
/// <returns>The corrected name if one was found, else the passed in name.</returns>
|
/// <returns>The corrected name if one was found, else the passed in name.</returns>
|
||||||
static string GetCorrectedParamName(const unordered_map<string, string>& names, const char* name)
|
static string GetCorrectedParamName(const unordered_map<string, string>& names, const char* name)
|
||||||
{
|
{
|
||||||
auto& newName = names.find(ToLower(name));
|
const auto& newName = names.find(ToLower(name));
|
||||||
|
|
||||||
if (newName != names.end())
|
if (newName != names.end())
|
||||||
return newName->second;
|
return newName->second;
|
||||||
|
@ -141,7 +141,7 @@ FunctionMapper::FunctionMapper()
|
|||||||
|
|
||||||
const string* FunctionMapper::GetGlobalFunc(const string& func)
|
const string* FunctionMapper::GetGlobalFunc(const string& func)
|
||||||
{
|
{
|
||||||
auto& text = m_GlobalMap.find(func);
|
const auto& text = m_GlobalMap.find(func);
|
||||||
|
|
||||||
if (text != m_GlobalMap.end())
|
if (text != m_GlobalMap.end())
|
||||||
return &text->second;
|
return &text->second;
|
||||||
|
Loading…
Reference in New Issue
Block a user