aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorDavid Doan <daviddoan@Davids-MacBook-Pro-100.local>2023-12-08 14:28:38 -0500
committerDavid Doan <daviddoan@Davids-MacBook-Pro-100.local>2023-12-08 14:28:38 -0500
commit1bb87c8ebfa7527e862a9295d7c877c23851ab34 (patch)
tree44f63305d8117e774ce12768c6893a0954d738b4 /src/main.cpp
parentdf15d0f234f464f53cfb2480f31a901f9df51ba7 (diff)
comment deletion
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp76
1 files changed, 1 insertions, 75 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 29828d8..36b21ff 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,85 +17,11 @@
int main(int argc, char *argv[])
{
- // QCoreApplication a(argc, argv);
-
- // QCommandLineParser parser;
- // parser.addHelpOption();
- // parser.addPositionalArgument("config", "Path of the config file.");
- // parser.process(a);
-
- // auto positionalArgs = parser.positionalArguments();
- // if (positionalArgs.size() != 1) {
- // std::cerr << "Not enough arguments. Please provide a path to a config file (.ini) as a command-line argument." << std::endl;
- // a.exit(1);
- // return 1;
- // }
-
- // QSettings settings( positionalArgs[0], QSettings::IniFormat );
- // QString iScenePath = settings.value("IO/scene").toString();
- // QString oImagePath = settings.value("IO/output").toString();
-
- // RenderData metaData;
- // bool success = SceneParser::parse(iScenePath.toStdString(), metaData);
-
- // if (!success) {
- // std::cerr << "Error loading scene: \"" << iScenePath.toStdString() << "\"" << std::endl;
- // a.exit(1);
- // return 1;
- // }
-
- // // Raytracing-relevant code starts here
-
- // int width = settings.value("Canvas/width").toInt();
- // int height = settings.value("Canvas/height").toInt();
-
- // // Extracting data pointer from Qt's image API
- // QImage image = QImage(width, height, QImage::Format_RGBX8888);
- // image.fill(Qt::black);
- // RGBA *data = reinterpret_cast<RGBA *>(image.bits());
-
- // // Setting up the raytracer
- // Config rtConfig{};
- // rtConfig.enableShadow = settings.value("Feature/shadows").toBool();
- // rtConfig.enableReflection = settings.value("Feature/reflect").toBool();
- // rtConfig.enableRefraction = settings.value("Feature/refract").toBool();
- // rtConfig.enableTextureMap = settings.value("Feature/texture").toBool();
- // rtConfig.enableTextureFilter = settings.value("Feature/texture-filter").toBool();
- // rtConfig.enableParallelism = settings.value("Feature/parallel").toBool();
- // rtConfig.enableSuperSample = settings.value("Feature/super-sample").toBool();
- // rtConfig.enableAntiAliasing = settings.value("Feature/post-process").toBool();
- // rtConfig.enableAcceleration = settings.value("Feature/acceleration").toBool();
- // rtConfig.enableDepthOfField = settings.value("Feature/depthoffield").toBool();
- // rtConfig.maxRecursiveDepth = settings.value("Settings/maximum-recursive-depth").toInt();
- // rtConfig.onlyRenderNormals = settings.value("Settings/only-render-normals").toBool();
-
- // RayTracer raytracer{ rtConfig };
-
- // RayTraceScene rtScene{ width, height, metaData };
-
- // // Note that we're passing `data` as a pointer (to its first element)
- // // Recall from Lab 1 that you can access its elements like this: `data[i]`
- // raytracer.render(data, rtScene);
-
- // // Saving the image
- // success = image.save(oImagePath);
- // if (!success) {
- // success = image.save(oImagePath, "PNG");
- // }
- // if (success) {
- // std::cout << "Saved rendered image to \"" << oImagePath.toStdString() << "\"" << std::endl;
- // } else {
- // std::cerr << "Error: failed to save image to \"" << oImagePath.toStdString() << "\"" << std::endl;
- // }
-
- // a.exit();
- // return 0;
-
QApplication a(argc, argv);
QCoreApplication::setApplicationName("The All Americans 4D Raytracer");
QCoreApplication::setOrganizationName("CS 1230/2230");
- // QCoreApplication::setApplicationVersion(QT_VERSION_STR);
+ QCoreApplication::setApplicationVersion(QT_VERSION_STR);
QSurfaceFormat fmt;
fmt.setVersion(4, 1);