mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-14 04:57:21 +01:00
39 lines
572 B
C++
39 lines
572 B
C++
#ifndef APPLICATION_H
|
|
#define APPLICATION_H
|
|
|
|
#include "sdl.inc.h"
|
|
#include "opengl.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "scene.h"
|
|
|
|
class Application {
|
|
public:
|
|
bool running;
|
|
int target_fps;
|
|
|
|
virtual void event(const SDL_Event &ev);
|
|
virtual void update(float delta);
|
|
virtual void render();
|
|
|
|
void main_loop();
|
|
|
|
Application();
|
|
virtual ~Application();
|
|
|
|
Scene *scene;
|
|
|
|
SDL_Window *window;
|
|
SDL_GLContext context;
|
|
|
|
static Application* get_singleton();
|
|
|
|
double frame_delta;
|
|
|
|
protected:
|
|
static Application* _instance;
|
|
};
|
|
|
|
#endif
|