32 lines
542 B
C++
32 lines
542 B
C++
#ifndef __APPLICATION_H__
|
|
#define __APPLICATION_H__
|
|
#include "util/Common.h"
|
|
#include "util/Singleton.h"
|
|
|
|
class Application : public Singleton<Application>
|
|
{
|
|
public:
|
|
Application();
|
|
~Application();
|
|
|
|
void Initialize();
|
|
void Exit() { m_run = false; }
|
|
|
|
friend class Singleton<Application>;
|
|
private:
|
|
SDL_Window* m_window;
|
|
SDL_Event m_event;
|
|
SDL_GLContext m_glContext;
|
|
|
|
GLuint now_;
|
|
GLuint last_;
|
|
double deltaTime_;
|
|
|
|
bool m_run;
|
|
|
|
void Run();
|
|
void Render();
|
|
void Update(GLfloat dtime);
|
|
};
|
|
#endif // __APPLICATION_H__
|