mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-22 13:40:06 -05:00
fcd060976c
-Support 4k monitors, and in general, properly scale any monitor that is not HD. -Allow for a spatial filter of radius zero, which means do not use a spatial filter. -Add new variations: concentric, cpow3, helicoid, helix, rand_cubes, sphereblur. -Use a new method for computing elliptic which is more precise. Developed by Discord user Claude. -Remove the 8 variation per xform limitation on the GPU. -Allow for loading the last flame file on startup, rather than randoms. -Use two different default quality values in the interactive renderer, one each for CPU and GPU. -Creating linked xforms was using non-standard behavior. Make it match Apo and also support creating multiple linked xforms at once. --Bug fixes -No variations in an xform used to have the same behavior as a single linear variation with weight 1. While sensible, this breaks backward compatibility. No variations now sets the output point to zeroes. -Prevent crashing the program when adjusting a value on the main window while a final render is in progress. -The xaos table was inverted. --Code changes -Convert projects to Visual Studio 2017. -Change bad vals from +- 1e10 to +-1e20. -Reintroduce the symmetry tag in xforms for legacy support in programs that do not use color_speed. -Compiler will not let us use default values in templated member functions anymore.
61 lines
1.9 KiB
C++
61 lines
1.9 KiB
C++
#include "FractoriumPch.h"
|
|
#include "Fractorium.h"
|
|
#include <QtWidgets/QApplication>
|
|
|
|
/// <summary>
|
|
/// Main program entry point for Fractorium.exe.
|
|
/// </summary>
|
|
/// <param name="argc">The number of command line arguments passed</param>
|
|
/// <param name="argv">The command line arguments passed</param>
|
|
/// <returns>0 if successful, else 1.</returns>
|
|
int main(int argc, char* argv[])
|
|
{
|
|
int rv = -1;
|
|
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
QApplication a(argc, argv);
|
|
#ifdef TEST_CL
|
|
QMessageBox::critical(QApplication::desktop(), "Error", "Fractorium cannot be run in test mode, undefine TEST_CL first.");
|
|
return 1;
|
|
#endif
|
|
#ifdef ISAAC_FLAM3_DEBUG
|
|
QMessageBox::critical(QApplication::desktop(), "Error", "Fractorium cannot be run in test mode, undefine ISAAC_FLAM3_DEBUG first.");
|
|
return 1;
|
|
#endif
|
|
_MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
|
|
_MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
|
|
auto vf = VarFuncs<float>::Instance();//Create instances that will stay alive until the program exits.
|
|
auto vlf = VariationList<float>::Instance();
|
|
auto palf = PaletteList<float>::Instance();
|
|
auto settings = FractoriumSettings::Instance();
|
|
#ifdef DO_DOUBLE
|
|
auto vd = VarFuncs<float>::Instance();
|
|
auto vld = VariationList<double>::Instance();//No further creations should occur after this.
|
|
#endif
|
|
|
|
try
|
|
{
|
|
//Required for large allocs, else GPU memory usage will be severely limited to small sizes.
|
|
//This must be done in the application and not in the EmberCL DLL.
|
|
#ifdef _WIN32
|
|
_putenv_s("GPU_MAX_ALLOC_PERCENT", "100");
|
|
#else
|
|
putenv(const_cast<char*>("GPU_MAX_ALLOC_PERCENT=100"));
|
|
#endif
|
|
Fractorium w;
|
|
w.show();
|
|
a.installEventFilter(&w);
|
|
rv = a.exec();
|
|
}
|
|
catch (const std::exception& e)
|
|
{
|
|
QMessageBox::critical(nullptr, "Fatal Error", QString::fromStdString(e.what()));
|
|
}
|
|
catch (const char* e)
|
|
{
|
|
QMessageBox::critical(nullptr, "Fatal Error", e);
|
|
}
|
|
|
|
return rv;
|
|
}
|
|
|