2D_Game_Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ApplicationTemplate Class Reference
Inheritance diagram for ApplicationTemplate:
Application

Public Member Functions

 ApplicationTemplate (const char *window_name, unsigned int width, unsigned int height, unsigned int fullscreen_width, unsigned int fullscreen_height, std::string &scene_path, bool resizable=false, bool imgui=false)
 
void OnUpdate (double frame_time) override
 
void OnRender () override
 
- Public Member Functions inherited from Application
 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)
 
 ~Application ()
 
void Run ()
 
virtual void OnImGuiUpdate ()
 
virtual void OnImGuiRender ()
 

Additional Inherited Members

- Protected Attributes inherited from Application
const char * m_WindowName
 
float m_FixedTimeStep =1.0f/60.0f
 Physics update time.
 
float m_Accumulator =0.0f
 
bool m_ImGui
 Enable or disable imgui.
 
Scenem_Scene
 

Detailed Description

Definition at line 20 of file application_template.cpp.

Constructor & Destructor Documentation

◆ ApplicationTemplate()

ApplicationTemplate::ApplicationTemplate ( const char * window_name,
unsigned int width,
unsigned int height,
unsigned int fullscreen_width,
unsigned int fullscreen_height,
std::string & scene_path,
bool resizable = false,
bool imgui = false )
inline

Definition at line 22 of file application_template.cpp.

Member Function Documentation

◆ OnRender()

void ApplicationTemplate::OnRender ( )
inlineoverridevirtual

Called every frame. It's the main rendering function.

Reimplemented from Application.

Definition at line 39 of file application_template.cpp.

◆ OnUpdate()

void ApplicationTemplate::OnUpdate ( double frame_time)
inlineoverridevirtual

This function is called every m_FixedTimeStep seconds. It's independent from the framerate. Edit m_FixedTimeStep to change the time between two calls.

Parameters
frame_timethe current frame time, should be m_FixedTimeStep

Reimplemented from Application.

Definition at line 35 of file application_template.cpp.


The documentation for this class was generated from the following file: