2018-09-05 23:10:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Scene.h"
|
|
|
|
|
2018-09-08 04:06:10 +00:00
|
|
|
#include "Camera2D.h"
|
|
|
|
|
2018-09-05 23:10:38 +00:00
|
|
|
#include "MyBatch.h"
|
2018-09-11 05:18:17 +00:00
|
|
|
#include "MySimpleShaderProgram.h"
|
2018-09-05 23:10:38 +00:00
|
|
|
|
2018-09-12 21:03:46 +00:00
|
|
|
using namespace charcoal;
|
|
|
|
|
2018-09-11 05:18:17 +00:00
|
|
|
class MySimple2DScene : public Scene
|
2018-09-05 23:10:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-09-11 05:18:17 +00:00
|
|
|
MySimple2DScene(Application& application);
|
|
|
|
~MySimple2DScene();
|
2018-09-05 23:10:38 +00:00
|
|
|
|
|
|
|
void init() override;
|
|
|
|
|
|
|
|
void use() override;
|
|
|
|
|
|
|
|
void unuse() override;
|
|
|
|
|
|
|
|
void update(float delta_time, clock_t clock) override;
|
|
|
|
|
2018-09-12 15:22:56 +00:00
|
|
|
void prerender() override;
|
|
|
|
|
2018-09-05 23:10:38 +00:00
|
|
|
void render() override;
|
2018-09-11 05:18:17 +00:00
|
|
|
|
2018-09-05 23:10:38 +00:00
|
|
|
private:
|
2018-09-11 05:18:17 +00:00
|
|
|
MySimpleShaderProgram m_shader_program;
|
2018-09-11 19:00:28 +00:00
|
|
|
MySimpleShaderProgram::Renderable m_shape;
|
|
|
|
MyBatch m_batch;
|
2018-09-08 04:06:10 +00:00
|
|
|
Camera2D m_camera;
|
2018-09-05 23:10:38 +00:00
|
|
|
};
|