CoriEngine
Loading...
Searching...
No Matches
EntryPoint.hpp
Go to the documentation of this file.
1#pragma once
2#ifdef CORI_ENABLE_PROFILING
3#include <tracy/Tracy.hpp>
4
5void* operator new(std::size_t count)
6{
7 auto ptr= malloc(count);
8 TracyAllocS(ptr, count, 35);
9 return ptr;
10}
11void operator delete(void* ptr) noexcept
12{
13 TracyFreeS(ptr, 35);
14 free(ptr);
15}
16#endif
17
18#include "Engine.hpp"
19
21
22int32_t main([[maybe_unused]] int32_t argc, [[maybe_unused]] char** argv) {
23
24 bool asyncLogging = false;
25 #ifdef CORI_ASYNC_LOGGING
26 asyncLogging = true;
27 #endif
28
29 bool fileLogging = true;
30 #ifdef CORI_NO_FILE_LOGGING
31 fileLogging = false;
32 #endif
33
34 Cori::Core::Internal::Engine::Start(asyncLogging, fileLogging);
35
37
38 if (app) {
39 app->Run();
40 delete app;
41 }
42 else {
43 return -1;
44 }
45
47}
int32_t main(int32_t argc, char **argv)
Main Application object, there can only be one Application object. Basically a root of the program.
void Run()
Run loop, internal.
static void Start(const bool asyncLogging, const bool fileLogging)
Definition Engine.cpp:7
Application * CreateApplication()