cleanup and instrumentation
This commit is contained in:
14
open_engine/include/open_engine/entry_point.hpp
Normal file → Executable file
14
open_engine/include/open_engine/entry_point.hpp
Normal file → Executable file
@@ -1,18 +1,26 @@
|
||||
#ifndef ENTRY_POINT_HPP
|
||||
#define ENTRY_POINT_HPP
|
||||
|
||||
#include "application.hpp"
|
||||
#include "open_engine/instrumentor.hpp"
|
||||
#include "open_engine/application.hpp"
|
||||
#include "open_engine/logging.hpp"
|
||||
|
||||
extern OpenEngine::Application* OpenEngine::CreateApplication();
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
OE_PROFILE_BEGIN_SESSION("Startup", "open_engine-startup.json");
|
||||
OpenEngine::Logger::Init();
|
||||
|
||||
auto app = OpenEngine::CreateApplication();
|
||||
app->Run();
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user