2D_Game_Engine
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
Application Class Reference

#include <application.hpp>

Inheritance diagram for Application:
ApplicationTemplate

Public Member Functions

 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 OnUpdate (const double frame_time)
 
virtual void OnRender ()
 
virtual void OnImGuiUpdate ()
 
virtual void OnImGuiRender ()
 

Protected Attributes

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 11 of file application.hpp.

Constructor & Destructor Documentation

◆ Application()

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 )

Definition at line 6 of file application.cpp.

◆ ~Application()

Application::~Application ( )

Definition at line 29 of file application.cpp.

Member Function Documentation

◆ OnImGuiRender()

void Application::OnImGuiRender ( )
virtual

Definition at line 147 of file application.cpp.

◆ OnImGuiUpdate()

void Application::OnImGuiUpdate ( )
virtual

Definition at line 141 of file application.cpp.

◆ OnRender()

void Application::OnRender ( )
virtual

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

Reimplemented in ApplicationTemplate.

Definition at line 133 of file application.cpp.

◆ OnUpdate()

void Application::OnUpdate ( const double frame_time)
virtual

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 in ApplicationTemplate.

Definition at line 127 of file application.cpp.

◆ Run()

void Application::Run ( )

Definition at line 53 of file application.cpp.

Member Data Documentation

◆ m_Accumulator

float Application::m_Accumulator =0.0f
protected

Definition at line 34 of file application.hpp.

◆ m_FixedTimeStep

float Application::m_FixedTimeStep =1.0f/60.0f
protected

Physics update time.

Definition at line 33 of file application.hpp.

◆ m_ImGui

bool Application::m_ImGui
protected

Enable or disable imgui.

Definition at line 35 of file application.hpp.

◆ m_Scene

Scene* Application::m_Scene
protected

Definition at line 36 of file application.hpp.

◆ m_WindowName

const char* Application::m_WindowName
protected

Definition at line 32 of file application.hpp.


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