#pragma once #include "Batch.h" #include "Poseable.h" #include "MySimpleShaderProgram.h" using namespace charcoal; class MyBatch : public Batch { public: MyBatch( const MySimpleShaderProgram::Renderable* renderable, const SizeType& element_count ) : MyBatch(renderable, element_count, element_count) {} MyBatch( const MySimpleShaderProgram::Renderable* renderable, const SizeType& element_count, const SizeType& element_render_count ) : Batch(renderable, element_render_count), m_color_elements(element_count), m_poseable_elements(element_count) {} MySimpleShaderProgram::Color& get_color(const SizeType& index) { return m_color_elements[index]; } Poseable& get_pose(const SizeType& index) { return m_poseable_elements[index]; } protected: void setup_element_buffers() override; void setup_vao() override; void update_element_buffers() override; private: const int COLOR_VBO_INDEX = 0; const int POSEABLE_VBO_INDEX = 1; std::vector m_color_elements; std::vector m_poseable_elements; };