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-11 19:00:28 +00:00
|
|
|
#include "MySimpleCubeScene.h"
|
2018-09-13 23:21:34 +00:00
|
|
|
#include "MyBuiltinCubeScene.h"
|
2018-09-14 22:09:43 +00:00
|
|
|
#include "MyBuiltinLitScene.h"
|
2018-09-15 21:40:49 +00:00
|
|
|
#include "MyBuiltinTexturedScene.h"
|
2018-09-18 20:55:32 +00:00
|
|
|
#include "MyBuiltinLitShadowedScene.h"
|
2018-09-04 19:25:54 +00:00
|
|
|
|
2018-09-12 21:03:46 +00:00
|
|
|
using namespace charcoal;
|
|
|
|
|
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;
|
|
|
|
|
2018-09-12 15:22:56 +00:00
|
|
|
void prerender() override;
|
|
|
|
|
2018-09-04 19:25:54 +00:00
|
|
|
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-11 19:00:28 +00:00
|
|
|
MySimpleCubeScene m_simple_cube_scene;
|
2018-09-13 23:21:34 +00:00
|
|
|
MyBuiltinCubeScene m_builtin_basic_cube_scene;
|
2018-09-14 22:09:43 +00:00
|
|
|
MyBuiltinLitScene m_builtin_lit_scene;
|
2018-09-15 21:40:49 +00:00
|
|
|
MyBuiltinTexturedScene m_builtin_textured_scene;
|
2018-09-18 20:55:32 +00:00
|
|
|
MyBuiltinLitShadowedScene m_builtin_lit_shadowed_scene;
|
2018-09-04 19:25:54 +00:00
|
|
|
};
|
|
|
|
|