mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 21:20:07 -05:00
1dfbd4eff2
-Add new preset dimensions to the right click menu of the width and height fields in the editor. -Change QSS stylesheets to properly handle tabs. -Make tabs rectangular by default. For some reason, they had always been triangular. --Bug fixes -Incremental rendering times in the editor were wrong. --Code changes -Migrate to Qt6. There is probably more work to be done here. -Migrate to VS2022. -Migrate to Wix 4 installer. -Change installer to install to program files for all users. -Fix many VS2022 code analysis warnings. -No longer use byte typedef, because std::byte is now a type. Revert all back to unsigned char. -Upgrade OpenCL headers to version 3.0 and keep locally now rather than trying to look for system files. -No longer link to Nvidia or AMD specific OpenCL libraries. Use the generic installer located at OCL_ROOT too. -Add the ability to change OpenCL grid dimensions. This was attempted for investigating possible performance improvments, but made no difference. This has not been verified on Linux or Mac yet.
79 lines
2.3 KiB
C++
79 lines
2.3 KiB
C++
#include "FractoriumPch.h"
|
|
#include "Fractorium.h"
|
|
#include <QtWidgets/QApplication>
|
|
#include <xmmintrin.h>
|
|
#include <immintrin.h>
|
|
#include <pmmintrin.h>
|
|
|
|
#ifdef __APPLE__
|
|
/// <summary>
|
|
/// Export default user data to ./config/fractorium
|
|
/// </summary>
|
|
void ExportUserData()
|
|
{
|
|
auto exec = new QProcess();
|
|
exec->setWorkingDirectory(QCoreApplication::applicationDirPath());
|
|
exec->start("/bin/sh", QStringList() << "fractorium-sh");
|
|
}
|
|
#endif
|
|
|
|
/// <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 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();
|
|
#ifdef __APPLE__
|
|
// exporting user data
|
|
ExportUserData();
|
|
#endif
|
|
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;
|
|
}
|
|
|