ASGE  3.2.0
Simple Game Framework in GL
ASGE::OGLGame Class Reference

#include <OGLGame.hpp>

Inheritance diagram for ASGE::OGLGame:
[legend]
Collaboration diagram for ASGE::OGLGame:
[legend]

Public Member Functions

 OGLGame (const ASGE::GameSettings &settings)
 
bool initAPI (const ASGE::GameSettings &settings) final
 
bool exitAPI () noexcept final
 
void beginFrame () final
 
void endFrame () final
 
- Public Member Functions inherited from ASGE::Game
 Game (const GameSettings &game_settings)
 
 Game (const Game &rhs)=delete
 
Gameoperator= (const Game &rhs)=delete
 
virtual ~Game ()
 
virtual void fixedUpdate (const GameTime &us)
 
virtual void update (const GameTime &us)=0
 
virtual void render (const GameTime &us)=0
 
int run ()
 
void signalExit () noexcept
 

Additional Inherited Members

- Protected Member Functions inherited from ASGE::Game
void toggleFPS () noexcept
 
int updateFPS ()
 
void initFileIO (const ASGE::GameSettings &settings)
 
const std::string & title () const
 
uint32_t fpsLimit () const
 
uint32_t fixedTimeStep () const
 
- Protected Attributes inherited from ASGE::Game
std::unique_ptr< Rendererrenderer
 
std::unique_ptr< Inputinputs
 
std::atomic< bool > show_fps { false }
 
std::atomic< bool > exit { false }
 

Detailed Description

an OpenGL implementation of the Game engine.

Supporting modern OpenGL this class allows the update and rendering of game objects, sprites and textures. It makes use of simple shaders and manages the creation and destruction of the OpenGL window subsystem. Currently it does not support resizing of windows on the fly, or focus loss.

Definition at line 29 of file OGLGame.hpp.

Member Function Documentation

◆ beginFrame()

void ASGE::OGLGame::beginFrame ( )
finalvirtual

Prepares the OpenGL subsystem for the next frame.

Implements ASGE::Game.

◆ endFrame()

void ASGE::OGLGame::endFrame ( )
finalvirtual

Clean-up the OpenGL subsystem at the end of the frame. This also includes the updating and rendering of FPS, dynamic_batch rendering, queue management and swapping of buffers.

Implements ASGE::Game.

◆ exitAPI()

bool ASGE::OGLGame::exitAPI ( )
finalvirtualnoexcept

Terminates the OpenGL subsystem.

Returns
True if managed gracefully.

Implements ASGE::Game.

◆ initAPI()

bool ASGE::OGLGame::initAPI ( const ASGE::GameSettings settings)
finalvirtual

Initialises the OpenGL subsystem.

Returns
True if successful.

Implements ASGE::Game.


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