#pragma once #include "Batch.h" #include "Poseable.h" #include "MySimpleShaderProgram.h" using namespace charcoal; class MyBatch : public charcoal::Batch { public: MyBatch( const MySimpleShaderProgram::RenderableT* renderable, int element_count ) : MyBatch(renderable, element_count, element_count) {} MyBatch( const MySimpleShaderProgram::RenderableT* renderable, int element_count, int element_render_count ) : Batch(renderable, element_render_count), m_color_elements(element_count), m_poseable_elements(element_count) {} MySimpleShaderProgram::Color& get_color(int index) { return m_color_elements[index]; } Poseable& get_pose(int 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; };