update framework utils

This commit is contained in:
2018-12-13 20:10:27 -05:00
parent d07115cf7c
commit 7b85d1e4db
5 changed files with 117 additions and 32 deletions

View File

@@ -11,6 +11,9 @@ private:
GLFWwindow *_window = nullptr;
int _gl_major, _gl_minor;
std::string _title;
float _last_time = 0, _time = 0, _rate = 1;
float _last_glfw_time = 0, _glfw_time = 0;
int _frame = 0;
static void onKey(GLFWwindow *window, int key, int scan_code, int action, int mods);
@@ -23,6 +26,12 @@ private:
protected:
App(int gl_major, int gl_minor);
void setTime(float time);
void setFrame(int frame);
void setRate(float rate);
void setTitle(std::string title);
void setX(int x);
@@ -56,6 +65,14 @@ protected:
public:
GLFWwindow *getWindow();
int getFrame();
float getRate();
float getTime();
float getTimeDelta();
std::string getTitle();
int getX();