#include <iostream>
#include <cstdlib>

#include "settings.hpp"
#include "window.hpp"

using namespace std;

//------------------------------------------------------------------------------
int main(int argc, char **argv)
//------------------------------------------------------------------------------
{
  try
  {
    CSettings settings("raytracer.conf", argv[1] ? string(argv[1]) : "");
    CWindow window("Raytracer", settings);

    window.Run();
  }
  catch (const string &e)
  {
    cout << e << endl;
    return EXIT_FAILURE;
  }

  return EXIT_SUCCESS;
}
