14#include "../render/render_bridge.h"
15#include "../render/renderer.h"
17scl::application *scl::application::Instance =
nullptr;
19scl::application::application(
const std::string &Name)
22 SCL_CORE_ASSERT(Instance ==
nullptr,
"Application instance already exist.");
27 Window = window::Create(700, 400, Name +
" (Sculpto application).");
28 render_bridge::InitContext();
33 event_dispatcher::AddEventListner<close_event>([&](close_event &) {
SCL_CORE_INFO(
"Application close event handled."); IsRunning =
false;
return false; });
36scl::application::~application()
44void scl::application::LoopIterationActions()
47 timer::Get()->Response();
48 input_system::Response();
54 if (!IsRunning)
return;
65 OnUpdate(timer::GetDeltaTime());
67 render_bridge::SwapBuffers();
70void scl::application::Run()
84 this->LoopIterationActions();
91 render_bridge::CloseContext();
94void scl::application::ShutDown()
#define SCL_CORE_ASSERT(expr,...)
#define SCL_CORE_INFO(...)
Sculpto library prehompiled header. Defines common definitions, includes commonly used modules.