charcoal/CharcoalBuiltin/BasicScene.h

44 lines
804 B
C
Raw Normal View History

#pragma once
#include <vector>
#include <charcoal/Application.h>
#include <charcoal/Camera.h>
#include <charcoal/constants.h>
#include "AutoPrerenderingScene.h"
#include "BasicShaderProgram.h"
2018-09-19 07:52:42 +00:00
#include "BasicTypes.h"
2018-09-14 22:09:43 +00:00
#include "Batched.h"
#include "BasicBatch.h"
namespace charcoal
{
namespace builtin
{
2018-09-19 07:52:42 +00:00
namespace basic
{
2018-09-19 07:52:42 +00:00
class Scene : public AutoPrerenderingScene, public Batched<Renderable, Batch>
{
public:
Scene(Application& application) : AutoPrerenderingScene(application) {}
2018-09-19 07:52:42 +00:00
void init() override;
2018-09-19 07:52:42 +00:00
void use() override;
2018-09-19 07:52:42 +00:00
void unuse() override;
2018-09-19 07:52:42 +00:00
void render() override;
2018-09-19 07:52:42 +00:00
protected:
void set_camera(const Camera* p_camera) { m_p_camera = p_camera; }
2018-09-19 07:52:42 +00:00
private:
ShaderProgram m_shader_program;
const Camera* m_p_camera = nullptr;
};
}
}
}