2018-09-13 04:51:47 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "MeshTypes.h"
|
2018-09-13 23:21:34 +00:00
|
|
|
#include "BuiltinBatch.h"
|
2018-09-13 04:51:47 +00:00
|
|
|
#include "Poseable.h"
|
|
|
|
|
|
|
|
namespace charcoal
|
|
|
|
{
|
|
|
|
namespace builtin
|
|
|
|
{
|
|
|
|
// TODO: Consider namespacing basic
|
|
|
|
class BasicBatch : public Batch<BasicVertex, Index, 1>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
BasicBatch(
|
|
|
|
BasicRenderable* renderable,
|
|
|
|
const SizeType& element_count
|
|
|
|
) : BasicBatch(renderable, element_count, element_count) {}
|
|
|
|
|
|
|
|
BasicBatch(
|
|
|
|
BasicRenderable* renderable,
|
|
|
|
const SizeType& element_count,
|
|
|
|
const SizeType& element_render_count
|
|
|
|
) : Batch(renderable, element_render_count), m_pose_elements(element_count) {}
|
|
|
|
|
|
|
|
virtual ~BasicBatch() {}
|
|
|
|
|
|
|
|
Poseable& get_pose(const SizeType& index) { return m_pose_elements[index]; }
|
|
|
|
const Poseable& get_pose(const SizeType& index) const { return m_pose_elements[index]; }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void setup_element_buffers() override;
|
|
|
|
|
|
|
|
void setup_vao() override;
|
|
|
|
|
|
|
|
void update_element_buffers() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::vector<Poseable> m_pose_elements;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|