GlistEngine
Loading...
Searching...
No Matches
gBaseApp Class Reference

#include <gBaseApp.h>

Inheritance diagram for gBaseApp:
Collaboration diagram for gBaseApp:

Public Member Functions

 gBaseApp ()
 
 gBaseApp (int argc, char **argv)
 
virtual ~gBaseApp ()
 
virtual void setup ()
 
virtual void update ()
 
virtual void start ()
 
virtual void stop ()
 
virtual void pause ()
 
virtual void resume ()
 
void setCurrentCanvas (gBaseCanvas *currentCanvas)
 
gBaseCanvasgetCurrentCanvas ()
 
void setTargetFramerate (int framerate)
 
int getTargetFramerate ()
 
int getFramerate ()
 
double getElapsedTime ()
 
void enableVsync ()
 
void disableVsync ()
 
- Public Member Functions inherited from gAppObject
 gAppObject ()
 
virtual ~gAppObject ()
 
- Public Member Functions inherited from gObject
 gObject ()
 
void logi (std::string message)
 
void logd (std::string message)
 
void logw (std::string message)
 
void loge (std::string message)
 
void logi (std::string tag, std::string message)
 
void logd (std::string tag, std::string message)
 
void logw (std::string tag, std::string message)
 
void loge (std::string tag, std::string message)
 

Static Public Member Functions

static gAppManagergetAppManager ()
 
static void setAppManager (gAppManager *appManager)
 
static gGUIManagergetGUIManager ()
 
- Static Public Member Functions inherited from gObject
static std::string gGetAppDir ()
 
static std::string gGetAssetsDir ()
 
static void gSetAssetsDir (std::string assetsDir)
 
static std::string gGetFilesDir ()
 
static std::string gGetImagesDir ()
 
static std::string gGetFontsDir ()
 
static std::string gGetModelsDir ()
 
static std::string gGetTexturesDir ()
 
static std::string gGetShadersDir ()
 
static std::string gGetSoundsDir ()
 
static std::string gGetDatabasesDir ()
 
static std::string gGetVideosDir ()
 
static void setCurrentResolution (int scalingNo, int currentResolutionNo)
 

Protected Attributes

int argc
 
char ** argv
 

Additional Inherited Members

- Static Public Attributes inherited from gObject
static const int LOGLEVEL_SILENT
 
static const int LOGLEVEL_DEBUG
 
static const int LOGLEVEL_INFO
 
static const int LOGLEVEL_WARNING
 
static const int LOGLEVEL_ERROR
 
- Static Protected Attributes inherited from gObject
static int renderpassnum
 
static int renderpassno
 
static int releasescaling
 
static int releaseresolution
 

Constructor & Destructor Documentation

◆ gBaseApp() [1/2]

gBaseApp::gBaseApp ( )

◆ gBaseApp() [2/2]

gBaseApp::gBaseApp ( int  argc,
char **  argv 
)

◆ ~gBaseApp()

virtual gBaseApp::~gBaseApp ( )
virtual

Member Function Documentation

◆ disableVsync()

void gBaseApp::disableVsync ( )

◆ enableVsync()

void gBaseApp::enableVsync ( )

◆ getAppManager()

static gAppManager * gBaseApp::getAppManager ( )
inlinestatic

◆ getCurrentCanvas()

gBaseCanvas * gBaseApp::getCurrentCanvas ( )

◆ getElapsedTime()

double gBaseApp::getElapsedTime ( )
Returns
Elapsed time between this frame and the previous one, as seconds. Also known as deltaTime.

◆ getFramerate()

int gBaseApp::getFramerate ( )
Returns
Current frames per second value.

◆ getGUIManager()

static gGUIManager * gBaseApp::getGUIManager ( )
inlinestatic

◆ getTargetFramerate()

int gBaseApp::getTargetFramerate ( )
Returns
Target frames per second value

◆ pause()

virtual void gBaseApp::pause ( )
virtual

Called when window is invisible. Application will stop rendering after this but will still receive updates.

◆ resume()

virtual void gBaseApp::resume ( )
virtual

Called when window is visible again. Application will continue rendering.

◆ setAppManager()

static void gBaseApp::setAppManager ( gAppManager appManager)
inlinestatic

◆ setCurrentCanvas()

void gBaseApp::setCurrentCanvas ( gBaseCanvas currentCanvas)

◆ setTargetFramerate()

void gBaseApp::setTargetFramerate ( int  framerate)
Parameters
framerateTarget frames per second value

◆ setup()

virtual void gBaseApp::setup ( )
virtual

◆ start()

virtual void gBaseApp::start ( )
virtual

Called after window is initialized and all resources have been reallocated (if required).

◆ stop()

virtual void gBaseApp::stop ( )
virtual

Called right before renderer and other gpu resources is destroyed.

◆ update()

virtual void gBaseApp::update ( )
virtual

Member Data Documentation

◆ argc

int gBaseApp::argc
protected

◆ argv

char** gBaseApp::argv
protected

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