charcoal/OpenGLEngine/BasicScene.h
elipzer d63f341d89 More builtin abstraction
Got the builtin basicscene to render. For some reason, it seems
like the model matrices are not working correctly. The two shapes
that are supposed to be rendering on screen are not moving around
as they should be.
2018-09-13 19:21:34 -04:00

44 lines
891 B
C++

#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;
};
}
}