hx3d  1
2D/3D Simple Game Framework
Public Member Functions | List of all members
hx3d::window::SDL2Application Class Reference

SDL2 application implementation. More...

#include <sdl2_application.hpp>

Public Member Functions

 SDL2Application (ApplicationConfig config)
 Create a SDL2 window. More...
 
virtual void start (const Ptr< Game > &game) override
 Start the window. More...
 
- Public Member Functions inherited from hx3d::window::Application
 Application (ApplicationConfig config)
 Create a 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...
 

Additional Inherited Members

- Protected Attributes inherited from hx3d::window::Application
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

SDL2 application implementation.

Definition at line 36 of file sdl2_application.hpp.

Constructor & Destructor Documentation

hx3d::window::SDL2Application::SDL2Application ( ApplicationConfig  config)

Create a SDL2 window.

Parameters
configConfiguration

Definition at line 49 of file sdl2_application.cpp.

Member Function Documentation

void hx3d::window::SDL2Application::start ( const Ptr< Game > &  game)
overridevirtual

Start the window.

Parameters
gameGame (Ptr)

Implements hx3d::window::Application.

Definition at line 76 of file sdl2_application.cpp.


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