--Bug fixes

-Really fix locking of affine scale.

--Code changes
 -Remove dependency projects from the solution. Move to a project design where they are built once via command line and stored in a /Deps folder.
  --Because of this, libpng is built as a static lib instead of a dll because that's what its command line makefile supports.
  --Remove libpng16.dll from Wix installer.
 -Remove all configs except for debug and release.
 -Remove all platforms except for x64.
 -Add #define __TBB_NO_IMPLICIT_LINKAGE 1 to prevent tbb from locking for tbb_debug.lib by default on debug builds.
 -Put Ember.rc in a filter folder in the project.
 -Place pragma warning disable statements in PCH files rather than in projects. This makes it easier when using Qt Creator.
 -Move all resource files to the MSVC folder.
 -Set all targets in QtCreator project to their lowercase names to be more *nix friendly. Set -l link statements to use these new lowercase names for ember and embercl.
 -Rework projects to favor shadow builds.
 -Remove the symlinks.sh file and all references to it. It was never needed. Instead, just specify multiple include and link paths in the .pro files.
 -Change WIN32 to _WIN32.
 -Fix a few code warnings.
This commit is contained in:
mfeemster
2016-03-01 17:26:45 -08:00
parent 695b8fc823
commit 7c856c929c
70 changed files with 1300 additions and 4046 deletions

View File

@ -1,6 +1,6 @@
#include "EmberPch.h"
#ifdef WIN32
#ifdef _WIN32
/// <summary>
/// Generated by Visual Studio to make the DLL run properly.
/// </summary>

View File

@ -54,8 +54,8 @@ public:
/// </summary>
/// <param name="ember">The Ember object to copy</param>
Ember(const Ember<T>& ember)
: m_VariationList(VariationList<T>::Instance()),
m_Edits(nullptr)
: m_Edits(nullptr),
m_VariationList(VariationList<T>::Instance())
{
Ember<T>::operator=<T>(ember);
}
@ -66,8 +66,8 @@ public:
/// <param name="ember">The Ember object to copy</param>
template <typename U>
Ember(const Ember<U>& ember)
: m_VariationList(VariationList<T>::Instance()),
m_Edits(nullptr)
: m_Edits(nullptr),
m_VariationList(VariationList<T>::Instance())
{
Ember<T>::operator=<U>(ember);
}

View File

@ -92,7 +92,7 @@ static inline size_t NowMs()
//#define ISAAC_FLAM3_DEBUG 1//This is almost never needed, but is very useful when troubleshooting difficult bugs. Enable it to do a side by side comparison with flam3.
//These two must always match.
#ifdef WIN32
#ifdef _WIN32
#define ALIGN __declspec(align(16))
#else
#define ALIGN __attribute__ ((aligned (16)))

View File

@ -1,4 +1,4 @@
#ifdef WIN32
#ifdef _WIN32
#pragma once
#endif
@ -8,8 +8,10 @@
#define NOMINMAX
#define _USE_MATH_DEFINES
#define __TBB_NO_IMPLICIT_LINKAGE 1//Prevent tbb from automatically looking for tbb_debug.lib. We only care about the release tbb.lib/dll.
#ifdef _WIN32
#pragma warning(disable : 4251; disable : 4661; disable : 4100)
#define basename(x) _strdup(x)
#define snprintf _snprintf
#define snprintf_s _snprintf_s

View File

@ -348,7 +348,7 @@ public:
//Add the edit attributes.
//Date.
myTime = time(nullptr);
#ifdef WIN32
#ifdef _WIN32
tm localt;
localtime_s(&localt, &myTime);
strftime(timeString, 128, "%a %b %d %H:%M:%S %z %Y", &localt);//XXX use standard time format including timezone.

View File

@ -1260,7 +1260,7 @@ EmberStats Renderer<T, bucketT>::Iterate(size_t iterCount, size_t temporalSample
parallel_for(size_t(0), m_ThreadsToUse, [&] (size_t threadIndex)
{
#endif
#if defined(WIN32)
#if defined(_WIN32)
SetThreadPriority(GetCurrentThread(), int(m_Priority));
#elif defined(__APPLE__)
sched_param sp = {0};

View File

@ -239,7 +239,7 @@ bool RendererBase::Ok() const
size_t RendererBase::MemoryAvailable()
{
size_t memAvailable = 0;
#ifdef WIN32
#ifdef _WIN32
MEMORYSTATUSEX stat;
stat.dwLength = sizeof(stat);
GlobalMemoryStatusEx(&stat);

View File

@ -446,9 +446,9 @@ const Variation<T>* VariationList<T>::GetVariation(size_t index, eVariationType
/// <param name="weight">The weight to assign the new copy. Default: 1</param>
/// <returns>A pointer to the variation at the index if in range, else nullptr.</returns>
template <typename T>
Variation<T>* VariationList<T>::GetVariationCopy(size_t index, T weight = 1) const { return MakeCopyWithWeight(GetVariation(index), weight); }
Variation<T>* VariationList<T>::GetVariationCopy(size_t index, T weight) const { return MakeCopyWithWeight(GetVariation(index), weight); }
template <typename T>
Variation<T>* VariationList<T>::GetVariationCopy(size_t index, eVariationType varType, T weight = 1) const { return MakeCopyWithWeight(GetVariation(index, varType), weight); }
Variation<T>* VariationList<T>::GetVariationCopy(size_t index, eVariationType varType, T weight) const { return MakeCopyWithWeight(GetVariation(index, varType), weight); }
/// <summary>
/// Get a pointer to the variation with the specified ID.
@ -473,7 +473,7 @@ const Variation<T>* VariationList<T>::GetVariation(eVariationId id) const
/// <param name="weight">The weight to assign the new copy. Default: 1</param>
/// <returns>A pointer to the variation with a matching ID, else nullptr.</returns>
template <typename T>
Variation<T>* VariationList<T>::GetVariationCopy(eVariationId id, T weight = 1) const { return MakeCopyWithWeight(GetVariation(id), weight); }
Variation<T>* VariationList<T>::GetVariationCopy(eVariationId id, T weight) const { return MakeCopyWithWeight(GetVariation(id), weight); }
/// <summary>
/// Get a pointer to the variation with the specified name.
@ -498,7 +498,7 @@ const Variation<T>* VariationList<T>::GetVariation(const string& name) const
/// <param name="weight">The weight to assign the new copy. Default: 1</param>
/// <returns>A pointer to the variation with a matching name, else nullptr.</returns>
template <typename T>
Variation<T>* VariationList<T>::GetVariationCopy(const string& name, T weight = 1) const { return MakeCopyWithWeight(GetVariation(name), weight); }
Variation<T>* VariationList<T>::GetVariationCopy(const string& name, T weight) const { return MakeCopyWithWeight(GetVariation(name), weight); }
/// <summary>
/// Get a parametric variation at the specified index.
@ -586,4 +586,4 @@ template EMBER_API class VariationList<float>;
#ifdef DO_DOUBLE
template EMBER_API class VariationList<double>;
#endif
}
}

View File

@ -442,7 +442,7 @@ public:
static string Itos(int i, int radix = 10)
{
char ch[16];
#ifdef WIN32
#ifdef _WIN32
_itoa_s(i, ch, 16, radix);
#else
sprintf(ch, "%d", i);
@ -460,7 +460,7 @@ public:
static string Itos64(size_t i, int radix = 10)
{
char ch[64];
#ifdef WIN32
#ifdef _WIN32
_ui64toa_s(i, ch, 64, radix);
#else
sprintf(ch, "%lu", i);
@ -1495,7 +1495,7 @@ private:
}
while (colorCount < numColors && colorCount < ember.m_Palette.m_Entries.size());
#ifdef WIN32
#ifdef _WIN32
if (sscanf_s(&(colstr[colorIndex]), "%1s", tmps, sizeof(tmps)) > 0) //Really need to migrate all of this parsing to C++.//TODO
#else