7cbe8acf30
Now the code is being compiled through .lib files!
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <charcoal/Batch.h>
|
|
#include <charcoal/Poseable.h>
|
|
|
|
#include "MySimpleShaderProgram.h"
|
|
|
|
using namespace charcoal;
|
|
|
|
class MyBatch : public charcoal::Batch<MySimpleShaderProgram::Vertex, MySimpleShaderProgram::Index, 2>
|
|
{
|
|
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<MySimpleShaderProgram::Color> m_color_elements;
|
|
std::vector<Poseable> m_poseable_elements;
|
|
}; |