hx3d  1
2D/3D Simple Game Framework
Public Member Functions | Protected Attributes | List of all members
hx3d::window::Application Class Referenceabstract

Application management. More...

#include <application.hpp>

Public Member Functions

 Application (ApplicationConfig config)
 Create a window. More...
 
virtual void start (const Ptr< Game > &game)=0
 Start the window. More...
 
int getWidth ()
 Get the window width. More...
 
int getHeight ()
 Get the window height. More...
 
glm::ivec2 getSize ()
 Get the window size (ivec2) More...
 
float getFPS ()
 Get the current frames per second (FPS) More...
 
float getElapsedTime ()
 Get the elapsed time in seconds since the application start. Reset after one hour. More...
 

Protected Attributes

Ptr< Game_game
 Game pointer.
 
bool _running
 Is the application running ?
 
int _width
 Application width.
 
int _height
 Application height.
 
unsigned int _fpsLimit
 FPS limit.
 
std::string _title
 Application title.
 
bool _fullscreen
 Is the application in fullscreen ?
 
float _currentFPS
 Current FPS.
 
float _elapsedTime
 Elapsed time since the beginning.
 

Detailed Description

Application management.

Definition at line 42 of file application.hpp.

Constructor & Destructor Documentation

hx3d::window::Application::Application ( ApplicationConfig  config)

Create a window.

Parameters
configConfiguration

Definition at line 26 of file application.cpp.

Member Function Documentation

float hx3d::window::Application::getElapsedTime ( )

Get the elapsed time in seconds since the application start. Reset after one hour.

Returns
Elapsed time

Definition at line 51 of file application.cpp.

float hx3d::window::Application::getFPS ( )

Get the current frames per second (FPS)

Returns
Current FPS

Definition at line 47 of file application.cpp.

int hx3d::window::Application::getHeight ( )

Get the window height.

Returns
Window height

Definition at line 39 of file application.cpp.

glm::ivec2 hx3d::window::Application::getSize ( )

Get the window size (ivec2)

Returns
Window size

Definition at line 43 of file application.cpp.

int hx3d::window::Application::getWidth ( )

Get the window width.

Returns
Window width

Definition at line 35 of file application.cpp.

virtual void hx3d::window::Application::start ( const Ptr< Game > &  game)
pure virtual

Start the window.

Parameters
gameGame (Ptr)

Implemented in hx3d::window::SDL2Application.


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