#ifndef ENTRY_POINT_HPP
#define ENTRY_POINT_HPP

#include "open_engine/application.hpp"
#include "open_engine/logging.hpp"

extern OpenEngine::Application* OpenEngine::CreateApplication(OpenEngine::ApplicationCommandLineArgs args);

int main(int argc, char** argv)
{
    OE_PROFILE_BEGIN_SESSION("Startup", "open_engine-startup.json");
    OpenEngine::Logger::Init();
    auto app = OpenEngine::CreateApplication({ argc, argv });
    OE_PROFILE_END_SESSION();

    OE_PROFILE_BEGIN_SESSION("Runtime", "open_engine-runtime.json");
    app->Run();
    OE_PROFILE_END_SESSION();

    OE_PROFILE_BEGIN_SESSION("Shutdown", "open_engine-shutdown.json");
    delete app;
    OE_PROFILE_END_SESSION();
}

#endif // ENTRY_POINT_HPP
