update framework utils
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user