2018-09-04 19:25:54 +00:00
|
|
|
#pragma once
|
|
|
|
#include "Application.h"
|
|
|
|
|
2018-09-11 05:18:17 +00:00
|
|
|
#include "MyBasicScene.h"
|
|
|
|
#include "MySimple2DScene.h"
|
|
|
|
#include "MySimple3DScene.h"
|
2018-09-04 19:25:54 +00:00
|
|
|
|
|
|
|
class MyApplication :
|
|
|
|
public Application
|
|
|
|
{
|
|
|
|
public:
|
2018-09-08 04:06:10 +00:00
|
|
|
MyApplication(int width = -1, int height = -1);
|
|
|
|
|
2018-09-11 01:21:19 +00:00
|
|
|
protected:
|
2018-09-05 15:47:09 +00:00
|
|
|
void init() override;
|
2018-09-04 19:25:54 +00:00
|
|
|
|
|
|
|
void update(float delta_time, clock_t clock) override;
|
|
|
|
|
|
|
|
void render() override;
|
|
|
|
|
|
|
|
void close() override;
|
|
|
|
|
|
|
|
private:
|
2018-09-05 23:10:38 +00:00
|
|
|
void swap_scene(Scene* scene);
|
|
|
|
|
|
|
|
Scene* m_p_current_scene = nullptr;
|
2018-09-11 05:18:17 +00:00
|
|
|
MyBasicScene m_basic_scene;
|
|
|
|
MySimple2DScene m_simple_2d_scene;
|
|
|
|
MySimple3DScene m_simple_3d_scene;
|
2018-09-04 19:25:54 +00:00
|
|
|
};
|
|
|
|
|