2018-09-15 21:40:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "AutoPrerenderingScene.h"
|
|
|
|
|
|
|
|
#include "BuiltinTypes.h"
|
|
|
|
#include "Camera.h"
|
|
|
|
#include "Batched.h"
|
|
|
|
#include "TexturedBatch.h"
|
|
|
|
#include "TexturedShaderProgram.h"
|
|
|
|
|
|
|
|
namespace charcoal
|
|
|
|
{
|
|
|
|
namespace builtin
|
|
|
|
{
|
2018-09-19 07:52:42 +00:00
|
|
|
namespace textured
|
2018-09-15 21:40:49 +00:00
|
|
|
{
|
2018-09-19 07:52:42 +00:00
|
|
|
class Scene : public AutoPrerenderingScene, public Batched<Renderable, Batch>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Scene(Application& application) : AutoPrerenderingScene(application) {}
|
|
|
|
virtual ~Scene() {}
|
2018-09-15 21:40:49 +00:00
|
|
|
|
2018-09-19 07:52:42 +00:00
|
|
|
void init() override;
|
2018-09-15 21:40:49 +00:00
|
|
|
|
2018-09-19 07:52:42 +00:00
|
|
|
void use() override;
|
2018-09-15 21:40:49 +00:00
|
|
|
|
2018-09-19 07:52:42 +00:00
|
|
|
void unuse() override;
|
2018-09-15 21:40:49 +00:00
|
|
|
|
2018-09-19 07:52:42 +00:00
|
|
|
void render() override;
|
2018-09-15 21:40:49 +00:00
|
|
|
|
2018-09-19 07:52:42 +00:00
|
|
|
protected:
|
|
|
|
void set_camera(const Camera* p_camera) { m_p_camera = p_camera; }
|
2018-09-15 21:40:49 +00:00
|
|
|
|
2018-09-19 07:52:42 +00:00
|
|
|
private:
|
|
|
|
ShaderProgram m_shader_program;
|
|
|
|
const Camera* m_p_camera = nullptr;
|
|
|
|
};
|
|
|
|
}
|
2018-09-15 21:40:49 +00:00
|
|
|
}
|
|
|
|
}
|