2018-09-04 19:25:54 +00:00
|
|
|
#pragma once
|
2018-10-11 05:26:24 +00:00
|
|
|
|
|
|
|
#include <charcoal/Application.h>
|
|
|
|
#include <charcoal/Scene.h>
|
2018-09-04 19:25:54 +00:00
|
|
|
|
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-10-15 01:19:38 +00:00
|
|
|
#include "MyBuiltinTexturedScene.h"
|
2018-10-15 23:53:22 +00:00
|
|
|
#include "MyBuiltinLitScene.h"
|
2018-10-17 23:21:58 +00:00
|
|
|
#include "MyPongScene.h"
|
2018-09-04 19:25:54 +00:00
|
|
|
|
2018-09-12 21:03:46 +00:00
|
|
|
using namespace charcoal;
|
|
|
|
|
2018-10-14 04:52:32 +00:00
|
|
|
class MyApplication : public Application
|
2018-09-04 19:25:54 +00:00
|
|
|
{
|
|
|
|
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-10-15 01:19:38 +00:00
|
|
|
MyBuiltinTexturedScene m_builtin_textured_scene;
|
2018-10-15 23:53:22 +00:00
|
|
|
MyBuiltinLitScene m_builtin_lit_scene;
|
2018-10-17 23:21:58 +00:00
|
|
|
MyPongScene m_pong_scene;
|
2018-09-04 19:25:54 +00:00
|
|
|
};
|
|
|
|
|