2D_Game_Engine
Loading...
Searching...
No Matches
application.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <renderer.hpp>
4#include <audio.hpp>
5#include <textrenderer.hpp>
6#include <texture.hpp>
7#include <scene.hpp>
8#include <window.hpp>
9#include <camera.hpp>
10
12public:
13 Application(const char *window_name,unsigned int width,unsigned int height,unsigned int fullscreen_width,unsigned int fullscreen_height,bool resizable=false,bool imgui=true);
15
16 void Run();
17
23 virtual void OnUpdate(const double frame_time);
27 virtual void OnRender();
28 virtual void OnImGuiUpdate();
29 virtual void OnImGuiRender();
30
31protected:
32 const char *m_WindowName;
33 float m_FixedTimeStep=1.0f/60.0f;
34 float m_Accumulator=0.0f;
35 bool m_ImGui;
37
38 #ifdef DEBUG
39 double last_time;
40 #endif
41};
virtual void OnUpdate(const double frame_time)
virtual void OnImGuiRender()
bool m_ImGui
Enable or disable imgui.
virtual void OnRender()
float m_Accumulator
const char * m_WindowName
float m_FixedTimeStep
Physics update time.
Scene * m_Scene
virtual void OnImGuiUpdate()
Application(const char *window_name, unsigned int width, unsigned int height, unsigned int fullscreen_width, unsigned int fullscreen_height, bool resizable=false, bool imgui=true)
Definition scene.hpp:6