charcoal/OpenGLEngine/BasicScene.h

44 lines
891 B
C
Raw Normal View History

#pragma once
#include <vector>
#include "AutoPrerenderingScene.h"
#include "BasicShaderProgram.h"
#include "BasicBatch.h"
#include "Camera2D.h"
#include "constants.h"
namespace charcoal
{
namespace builtin
{
class BasicScene : public AutoPrerenderingScene
{
public:
BasicScene(Application& application) : AutoPrerenderingScene(application) {}
virtual ~BasicScene() {}
void init() override;
void use() override;
void unuse() override;
void render() override;
protected:
void set_camera(const Camera* p_camera) { m_p_camera = p_camera; }
BasicBatch& add_batch(BasicRenderable* renderable, int element_count);
BasicBatch& add_batch(BasicRenderable* renderable, int element_count, int element_render_count);
private:
BasicShaderProgram m_shader_program;
std::vector<BasicBatch> m_batches;
const Camera* m_p_camera = nullptr;
};
}
}