diff --git a/Builds/MSVC/Installer/FractoriumInstaller.wixproj b/Builds/MSVC/Installer/FractoriumInstaller.wixproj index 0325688..0c25e5c 100644 --- a/Builds/MSVC/Installer/FractoriumInstaller.wixproj +++ b/Builds/MSVC/Installer/FractoriumInstaller.wixproj @@ -1,7 +1,7 @@ 3.7 - Fractorium_23.23.8.100 + Fractorium_23.23.8.101 $(SolutionDir)..\..\..\Bin\$(Platform)\$(Configuration)\ diff --git a/Builds/MSVC/Installer/Product.wxs b/Builds/MSVC/Installer/Product.wxs index 0bf0fc9..faf01c4 100644 --- a/Builds/MSVC/Installer/Product.wxs +++ b/Builds/MSVC/Installer/Product.wxs @@ -1,5 +1,5 @@  - + @@ -12,7 +12,7 @@ - + @@ -124,19 +124,19 @@ - + - + - + - + - + diff --git a/Builds/MSVC/Solution/Ember.rc b/Builds/MSVC/Solution/Ember.rc index 40d4bc5..dd0f106 100644 Binary files a/Builds/MSVC/Solution/Ember.rc and b/Builds/MSVC/Solution/Ember.rc differ diff --git a/Builds/MSVC/Solution/EmberAnimate.rc b/Builds/MSVC/Solution/EmberAnimate.rc index ccc9585..00036d8 100644 --- a/Builds/MSVC/Solution/EmberAnimate.rc +++ b/Builds/MSVC/Solution/EmberAnimate.rc @@ -49,8 +49,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 23, 23, 8, 100 - PRODUCTVERSION 23, 23, 8, 100 + FILEVERSION 23, 23, 8, 101 + PRODUCTVERSION 23, 23, 8, 101 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -67,12 +67,12 @@ BEGIN VALUE "CompanyName", "Open Source" VALUE "FileDescription", "Renders fractal flames as animations with motion blur" - VALUE "FileVersion", "23, 23, 8, 100" + VALUE "FileVersion", "23, 23, 8, 101" VALUE "InternalName", "EmberAnimate.exe" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2021, GPL v3" VALUE "OriginalFilename", "EmberAnimate.exe" VALUE "ProductName", "Ember Animate" - VALUE "ProductVersion", "23, 23, 8, 100" + VALUE "ProductVersion", "23, 23, 8, 101" END END BLOCK "VarFileInfo" diff --git a/Builds/MSVC/Solution/EmberCL.rc b/Builds/MSVC/Solution/EmberCL.rc index 9885b0a..c4a41d3 100644 Binary files a/Builds/MSVC/Solution/EmberCL.rc and b/Builds/MSVC/Solution/EmberCL.rc differ diff --git a/Builds/MSVC/Solution/EmberGenome.rc b/Builds/MSVC/Solution/EmberGenome.rc index 2181e92..edaafe6 100644 --- a/Builds/MSVC/Solution/EmberGenome.rc +++ b/Builds/MSVC/Solution/EmberGenome.rc @@ -49,8 +49,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 23, 23, 8, 100 - PRODUCTVERSION 23, 23, 8, 100 + FILEVERSION 23, 23, 8, 101 + PRODUCTVERSION 23, 23, 8, 101 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -67,12 +67,12 @@ BEGIN VALUE "CompanyName", "Open Source" VALUE "FileDescription", "Manipulates fractal flame parameter files" - VALUE "FileVersion", "23, 23, 8, 100" + VALUE "FileVersion", "23, 23, 8, 101" VALUE "InternalName", "EmberGenome.exe" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2021, GPL v3" VALUE "OriginalFilename", "EmberGenome.exe" VALUE "ProductName", "Ember Genome" - VALUE "ProductVersion", "23, 23, 8, 100" + VALUE "ProductVersion", "23, 23, 8, 101" END END BLOCK "VarFileInfo" diff --git a/Builds/MSVC/Solution/EmberRender.rc b/Builds/MSVC/Solution/EmberRender.rc index 4ce4541..176df7a 100644 --- a/Builds/MSVC/Solution/EmberRender.rc +++ b/Builds/MSVC/Solution/EmberRender.rc @@ -49,8 +49,8 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION 23, 23, 8, 100 - PRODUCTVERSION 23, 23, 8, 100 + FILEVERSION 23, 23, 8, 101 + PRODUCTVERSION 23, 23, 8, 101 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -67,12 +67,12 @@ BEGIN VALUE "CompanyName", "Open Source" VALUE "FileDescription", "Renders fractal flames as single images" - VALUE "FileVersion", "23, 23, 8, 100" + VALUE "FileVersion", "23, 23, 8, 101" VALUE "InternalName", "EmberRender.exe" VALUE "LegalCopyright", "Copyright (C) Matt Feemster 2021, GPL v3" VALUE "OriginalFilename", "EmberRender.exe" VALUE "ProductName", "Ember Render" - VALUE "ProductVersion", "23, 23, 8, 100" + VALUE "ProductVersion", "23, 23, 8, 101" END END BLOCK "VarFileInfo" diff --git a/Builds/MSVC/Solution/Fractorium.rc b/Builds/MSVC/Solution/Fractorium.rc index f574574..ee4e668 100644 Binary files a/Builds/MSVC/Solution/Fractorium.rc and b/Builds/MSVC/Solution/Fractorium.rc differ diff --git a/Data/Version History.txt b/Data/Version History.txt index 8c39fb4..48e4219 100644 --- a/Data/Version History.txt +++ b/Data/Version History.txt @@ -1,4 +1,4 @@ -23.23.8.100 8/6/2023 +23.23.8.1 8/6/2023 --User changes -Add Clear Sequence button to the Sequence Panel. diff --git a/Source/Ember/EmberDefines.h b/Source/Ember/EmberDefines.h index 9a99cc1..e164125 100644 --- a/Source/Ember/EmberDefines.h +++ b/Source/Ember/EmberDefines.h @@ -37,7 +37,7 @@ static void sincos(float x, float* s, float* c) namespace EmberNs { -#define EMBER_VERSION "23.23.8.100" +#define EMBER_VERSION "23.23.8.101" //#define FLAM3_COMPAT 1//Uncomment this if you want full compatibility with flam3 regarding some of the trig-based variations in Variations01.h #define EPS6 T(1e-6) #define EPS std::numeric_limits::epsilon()//Apoplugin.h uses -20, but it's more mathematically correct to do it this way. diff --git a/Source/Ember/RendererBase.cpp b/Source/Ember/RendererBase.cpp index e9c67d4..3509d7b 100644 --- a/Source/Ember/RendererBase.cpp +++ b/Source/Ember/RendererBase.cpp @@ -531,6 +531,10 @@ bool RendererBase::Shared() const { return false; } void RendererBase::Reset() { Abort(); + + while (InRender()) + std::this_thread::sleep_for(std::chrono::milliseconds(10)); + EnterRender(); EnterFinalAccum(); LeaveFinalAccum(); diff --git a/Source/Fractorium/AboutDialog.ui b/Source/Fractorium/AboutDialog.ui index a4c0c51..52dec0b 100644 --- a/Source/Fractorium/AboutDialog.ui +++ b/Source/Fractorium/AboutDialog.ui @@ -61,7 +61,7 @@ QFrame::NoFrame - <html><head/><body><p align="center"><span style=" font-size:10pt;">Fractorium 23.23.8.100</span></p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><a href="http://fractorium.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">fractorium.com</span></a></p></body></html> + <html><head/><body><p align="center"><span style=" font-size:10pt;">Fractorium 23.23.8.101</span></p><p align="center"><span style=" font-size:10pt;">A Qt-based fractal flame editor which uses a C++ re-write of the flam3 algorithm named Ember and a GPU capable version named EmberCL which implements a portion of the cuburn algorithm in OpenCL.</span></p><p align="center"><a href="http://fractorium.com"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">fractorium.com</span></a></p></body></html> Qt::RichText diff --git a/Source/Fractorium/FinalRenderEmberController.cpp b/Source/Fractorium/FinalRenderEmberController.cpp index e14f711..014f628 100644 --- a/Source/Fractorium/FinalRenderEmberController.cpp +++ b/Source/Fractorium/FinalRenderEmberController.cpp @@ -40,15 +40,7 @@ void FinalRenderEmberController::CancelRender() if (m_Renderer.get()) { - m_Renderer->Abort(); - - while (m_Renderer->InRender()) - std::this_thread::sleep_for(std::chrono::milliseconds(10)); - - m_Renderer->EnterRender(); - m_Renderer->EnterFinalAccum(); - m_Renderer->LeaveFinalAccum(); - m_Renderer->LeaveRender(); + m_Renderer->Reset(); } else { diff --git a/Source/Fractorium/FinalRenderEmberController.h b/Source/Fractorium/FinalRenderEmberController.h index 3edba1d..0bcf75b 100644 --- a/Source/Fractorium/FinalRenderEmberController.h +++ b/Source/Fractorium/FinalRenderEmberController.h @@ -177,7 +177,7 @@ public: using PreviewRenderer::m_PreviewRenderer; using PreviewRenderer::m_PreviewFinalImage; - FinalRenderPreviewRenderer(FinalRenderEmberController* controller) : m_Controller(controller) + FinalRenderPreviewRenderer(FinalRenderEmberController* controller) : m_Controller(controller), PreviewRenderer(nullptr) { } diff --git a/Source/Fractorium/Fractorium.ui b/Source/Fractorium/Fractorium.ui index 3d3c966..44462a1 100644 --- a/Source/Fractorium/Fractorium.ui +++ b/Source/Fractorium/Fractorium.ui @@ -6264,8 +6264,8 @@ 0 0 - 269 - 650 + 144 + 58 @@ -8074,6 +8074,13 @@ + + + + 0 + + + diff --git a/Source/Fractorium/FractoriumEmberController.cpp b/Source/Fractorium/FractoriumEmberController.cpp index a3bcd1c..acdf965 100644 --- a/Source/Fractorium/FractoriumEmberController.cpp +++ b/Source/Fractorium/FractoriumEmberController.cpp @@ -68,8 +68,8 @@ FractoriumEmberController::FractoriumEmberController(Fractorium* fractorium) { size_t b = 0; m_GLController = make_unique>(fractorium, fractorium->ui.GLDisplay, this); - m_LibraryPreviewRenderer = make_unique>(this, m_Fractorium->ui.LibraryTree, m_EmberFile); - m_SequencePreviewRenderer = make_unique>(this, m_Fractorium->ui.SequenceTree, m_SequenceFile); + m_LibraryPreviewRenderer = make_unique>(this, m_Fractorium->ui.LibraryTree, m_EmberFile, nullptr); + m_SequencePreviewRenderer = make_unique>(this, m_Fractorium->ui.SequenceTree, m_SequenceFile, m_Fractorium->ui.SequenceProgressBar); m_PaletteList->Clear(); m_Fractorium->ui.PaletteFilenameCombo->clear(); //Initial combo change event to fill the palette table will be called automatically later. @@ -397,6 +397,12 @@ void TreePreviewRenderer::PreviewRenderFunc(uint start, uint end) if (const auto top = m_Tree->topLevelItem(m_Tree->topLevelItemCount() - 1)) { size_t i = start; + double prc = 0; + double ct = 0; + double total = end - start; + + if (m_Pb) + QMetaObject::invokeMethod(m_Pb, "setValue", Qt::QueuedConnection, Q_ARG(const int, 0)); for (auto b = Advance(m_EmberFile.m_Embers.begin(), start); m_PreviewRun && i < end && b != m_EmberFile.m_Embers.end(); ++b, ++i) { @@ -422,11 +428,19 @@ void TreePreviewRenderer::PreviewRenderFunc(uint start, uint end) Q_ARG(vv4F&, m_PreviewFinalImage), Q_ARG(uint, PREVIEW_SIZE), Q_ARG(uint, PREVIEW_SIZE)); + prc = 100.0 * (++ct / total); + + if (m_Pb) + QMetaObject::invokeMethod(m_Pb, "setValue", Qt::QueuedConnection, Q_ARG(const int, int(prc))); + treeItem->SetRendered(); } } } } + + if (m_Pb) + QMetaObject::invokeMethod(m_Pb, "setValue", Qt::QueuedConnection, Q_ARG(const int, 100)); } } diff --git a/Source/Fractorium/FractoriumEmberController.h b/Source/Fractorium/FractoriumEmberController.h index 8268ece..506c0b4 100644 --- a/Source/Fractorium/FractoriumEmberController.h +++ b/Source/Fractorium/FractoriumEmberController.h @@ -646,8 +646,9 @@ template class PreviewRenderer { public: - PreviewRenderer() + PreviewRenderer(QProgressBar* p) { + m_Pb = p; } virtual ~PreviewRenderer() @@ -669,8 +670,10 @@ public: void Stop() { m_PreviewRun = false; - m_PreviewRenderer.Abort(); - m_PreviewResult.waitForFinished(); + m_PreviewRenderer.Reset(); + + while (m_PreviewResult.isRunning()) + QApplication::processEvents(); } bool EarlyClip() @@ -696,6 +699,7 @@ protected: vector m_PreviewVec; vv4F m_PreviewFinalImage; EmberNs::Renderer m_PreviewRenderer; + QProgressBar* m_Pb = nullptr; private: QFuture m_PreviewResult; @@ -714,6 +718,7 @@ public: using PreviewRenderer::m_PreviewVec; using PreviewRenderer::m_PreviewRenderer; using PreviewRenderer::m_PreviewFinalImage; + using PreviewRenderer::m_Pb; /// /// Initializes a new instance of the class. @@ -721,10 +726,11 @@ public: /// A pointer to the controller this instance is a member of /// A pointer to the tree to render to /// A reference to the ember file to render - TreePreviewRenderer(FractoriumEmberController* controller, QTreeWidget* tree, EmberFile& emberFile) : + TreePreviewRenderer(FractoriumEmberController* controller, QTreeWidget* tree, EmberFile& emberFile, QProgressBar* p) : m_Controller(controller), m_Tree(tree), - m_EmberFile(emberFile) + m_EmberFile(emberFile), + PreviewRenderer(p) { const auto f = m_Controller->m_Fractorium; m_PreviewRenderer.Callback(nullptr); diff --git a/Source/Fractorium/FractoriumLibrary.cpp b/Source/Fractorium/FractoriumLibrary.cpp index a39b19b..6ea9188 100644 --- a/Source/Fractorium/FractoriumLibrary.cpp +++ b/Source/Fractorium/FractoriumLibrary.cpp @@ -465,7 +465,11 @@ void FractoriumEmberController::RenderLibraryPreviews(uint start, uint end) } template -void FractoriumEmberController::StopLibraryPreviewRender() { m_LibraryPreviewRenderer->Stop(); } +void FractoriumEmberController::StopLibraryPreviewRender() +{ + m_LibraryPreviewRenderer->Stop(); + QApplication::processEvents(); +} /// /// Thing wrapper around StopLibraryPreviewRender() and StopSequencePreviewRender() to stop both preview renderers. @@ -571,17 +575,18 @@ void FractoriumEmberController::RenderSequencePreviews(uint start, uint end) RenderPreviews(m_Fractorium->ui.SequenceTree, m_SequencePreviewRenderer.get(), m_SequenceFile, start, end); } -void Fractorium::OnSequenceStartPreviewsButtonClicked(bool checked) -{ - m_Controller->RenderSequencePreviews(); -} +void Fractorium::OnSequenceStartPreviewsButtonClicked(bool checked) { m_Controller->RenderSequencePreviews(); } /// /// Stop rendering the sequence previews. /// Called when Stop Previews is clicked. /// template -void FractoriumEmberController::StopSequencePreviewRender() { m_SequencePreviewRenderer->Stop(); } +void FractoriumEmberController::StopSequencePreviewRender() +{ + m_SequencePreviewRenderer->Stop(); + QApplication::processEvents(); +} void Fractorium::OnSequenceStopPreviewsButtonClicked(bool checked) { m_Controller->StopSequencePreviewRender(); } /// diff --git a/Source/Fractorium/FractoriumMenus.cpp b/Source/Fractorium/FractoriumMenus.cpp index 94c03c0..64e2402 100644 --- a/Source/Fractorium/FractoriumMenus.cpp +++ b/Source/Fractorium/FractoriumMenus.cpp @@ -290,13 +290,13 @@ void FractoriumEmberController::OpenAndPrepFiles(const QStringList& filenames { if (!filenames.empty()) { + StopAllPreviewRenderers(); size_t i; EmberFile emberFile; XmlToEmber parser; vector> embers; vector errors; uint previousSize = append ? uint(m_EmberFile.Size()) : 0u; - StopAllPreviewRenderers(); emberFile.m_Filename = filenames[0]; for (auto& filename : filenames) diff --git a/Source/Fractorium/FractoriumRender.cpp b/Source/Fractorium/FractoriumRender.cpp index 6ea3505..e03afdf 100644 --- a/Source/Fractorium/FractoriumRender.cpp +++ b/Source/Fractorium/FractoriumRender.cpp @@ -641,7 +641,7 @@ bool FractoriumEmberController::CreateRenderer(eRendererType renderType, cons if (updatePreviews) { - m_LibraryPreviewRenderer = make_unique>(this, m_Fractorium->ui.LibraryTree, m_EmberFile);//Will take the same settings as the main renderer. + m_LibraryPreviewRenderer = make_unique>(this, m_Fractorium->ui.LibraryTree, m_EmberFile, nullptr);//Will take the same settings as the main renderer. RenderLibraryPreviews(); }