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
5
void
*
operator
new
(std::size_t count)
6
{
7
auto
ptr= malloc(count);
8
TracyAllocS(ptr, count, 35);
9
return
ptr;
10
}
11
void
operator
delete
(
void
* ptr)
noexcept
12
{
13
TracyFreeS(ptr, 35);
14
free(ptr);
15
}
16
#endif
17
18
#include "
Engine.hpp
"
19
20
extern
Cori::Core::Application
*
Cori::Core::CreateApplication
();
21
22
int32_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
36
Cori::Core::Application
* app =
Cori::Core::CreateApplication
();
37
38
if
(app) {
39
app->
Run
();
40
delete
app;
41
}
42
else
{
43
return
-1;
44
}
45
46
Cori::Core::Internal::Engine::Stop
();
47
}
Engine.hpp
main
int32_t main(int32_t argc, char **argv)
Definition
EntryPoint.hpp:22
Cori::Core::Application
Main Application object, there can only be one Application object. Basically a root of the program.
Definition
Application.hpp:23
Cori::Core::Application::Run
void Run()
Run loop, internal.
Definition
Application.cpp:103
Cori::Core::Internal::Engine::Start
static void Start(const bool asyncLogging, const bool fileLogging)
Definition
Engine.cpp:7
Cori::Core::Internal::Engine::Stop
static void Stop()
Definition
Engine.cpp:18
Cori::Core::CreateApplication
Application * CreateApplication()
CoriEngine
Engine
src
Core
EntryPoint.hpp
Generated by
1.14.0