--User changes

-Remove the option --intpalette to format the palette in the xml as ints. If they are not hex formatted, then they should always be float. This option was pointless.
 -Cleanup some options text for the command line programs.
 -Allow for dragging around flames in the library tab. This is useful for setting up the order of an animation.
 -Make the opening of large files in Fractorium much more efficient when not-appending.
 -Make the opening of large files in all EmberRender and EmberAnimate more efficient.
 -Better error reporting when opening files.

--Bug fixes
 -Get rid of leftover artifacts that would appear on preview thumbnails when either switching SP/DP or re-rendering previews.
 -Filename extension was not being appended on Linux when saving as Xml, thus making it impossible to drag that file back in becase drop is filtered on extension.

--Code changes
 -Move GCC compiler spec to C++14. Building with 5.3 now on linux.
 -Use inline member data initializers.
 -Make a #define for static for use in Utils.h to make things a little cleaner.
 -Make various functions able to take arbitrary collections as their parameters rather than just vectors.
 -Make library collection a list rather than vector. This alleviates the need to re-sync pointers whenever the collection changes.
 -Subclass QTreeWidget for the library tree. Two new files added for this.
 -Remove all usage of #ifdef ROW_ONLY_DE in DEOpenCLKernelCreator, it was never used.
 -Add move constructor and assignment operator to EmberFile.
 -Add the ability to use a pointer to outside memory in the renderer for the vector of Ember<T>.
 -Make a lot more functions const where they should be.
This commit is contained in:
mfeemster
2016-04-03 18:55:12 -07:00
parent 124f807772
commit b690bf8071
64 changed files with 890 additions and 1048 deletions

View File

@ -20,10 +20,9 @@ public:
/// <summary>
/// Constructor that initializes the state to zero.
/// </summary>
RenderProgress()
{
Clear();
}
RenderProgress() = default;
RenderProgress(RenderProgress<T>& progress) = delete;
~RenderProgress() = default;
/// <summary>
/// The progress function which will be called from inside the renderer.
@ -33,7 +32,7 @@ public:
/// <param name="fraction">The progress fraction from 0-100</param>
/// <param name="stage">The stage of iteration. 1 is iterating, 2 is density filtering, 2 is final accumulation.</param>
/// <param name="etaMs">The estimated milliseconds to completion of the current stage</param>
/// <returns>1 since this is intended to run in an environment where the render runs to completion, unlike interactive rendering.</returns>
/// <returns>The value of m_Running, which is always true since this is intended to run in an environment where the render runs to completion, unlike interactive rendering.</returns>
virtual int ProgressFunc(Ember<T>& ember, void* foo, double fraction, int stage, double etaMs)
{
if (stage == 0 || stage == 1)
@ -51,7 +50,7 @@ public:
}
m_LastStage = stage;
return 1;
return m_Running;
}
/// <summary>
@ -59,15 +58,25 @@ public:
/// </summary>
void Clear()
{
m_Running = 1;
m_LastStage = 0;
m_LastLength = 0;
m_SS.clear();
m_S.clear();
}
/// <summary>
/// Stop this instance.
/// </summary>
void Stop()
{
m_Running = 0;
}
private:
int m_LastStage;
int m_LastLength;
int m_Running = 1;
int m_LastStage = 0;
int m_LastLength = 0;
stringstream m_SS;
string m_S;
Timing t;
@ -286,7 +295,7 @@ static Renderer<T, float>* CreateRenderer(eRendererType renderType, const vector
if (renderType == eRendererType::OPENCL_RENDERER && !devices.empty())
{
s = "OpenCL";
renderer = unique_ptr<Renderer<T, float>>(new RendererCL<T, float>(devices, shared, texId));
renderer = unique_ptr<Renderer<T, float>>(new RendererCL<T, float>(devices, shared, texId));//Can't use make_unique here.
if (!renderer.get() || !renderer->Ok())
{
@ -294,13 +303,13 @@ static Renderer<T, float>* CreateRenderer(eRendererType renderType, const vector
errorReport.AddToReport(renderer->ErrorReport());
errorReport.AddToReport("Error initializing OpenCL renderer, using CPU renderer instead.");
renderer = unique_ptr<Renderer<T, float>>(new Renderer<T, float>());
renderer = make_unique<Renderer<T, float>>();
}
}
else
{
s = "CPU";
renderer = unique_ptr<Renderer<T, float>>(new Renderer<T, float>());
renderer = make_unique<Renderer<T, float>>();
}
}
catch (const std::exception& e)
@ -343,7 +352,7 @@ static vector<unique_ptr<Renderer<T, float>>> CreateRenderers(eRendererType rend
for (size_t i = 0; i < devices.size(); i++)
{
vector<pair<size_t, size_t>> tempDevices{ devices[i] };
auto renderer = unique_ptr<Renderer<T, float>>(new RendererCL<T, float>(tempDevices, !i ? shared : false, texId));
auto renderer = unique_ptr<Renderer<T, float>>(new RendererCL<T, float>(tempDevices, !i ? shared : false, texId));//Can't use make_unique here.
if (!renderer.get() || !renderer->Ok())
{