0a9fde252a
The trapezoid now throbs between black and white. This was made to test out the element buffers using MyBatch. Next up for the batches should probably be to figure out the recommended way of specifying more than one element buffer. Currently it is done by specifying the number of elements to be stored and the number of element vbos needed but maybe there is some way to get it to work using variadic templates. There is a comment about this in the Batch.h file.
22 lines
559 B
C++
22 lines
559 B
C++
#pragma once
|
|
|
|
#include "Batch.h"
|
|
|
|
#include "MyBatchTestShaderProgram.h"
|
|
|
|
class MyBatch : public Batch<MyBatchTestShaderProgram::VertexType, MyBatchTestShaderProgram::IndexType, 1, MyBatchTestShaderProgram::ColorType>
|
|
{
|
|
public:
|
|
MyBatch(
|
|
const MyBatchTestShaderProgram::RenderableType* renderable,
|
|
const SizeType& element_count,
|
|
const SizeType& element_render_count
|
|
) : Batch(renderable, element_count, element_render_count) {}
|
|
|
|
protected:
|
|
void setup_element_buffers() override;
|
|
|
|
void setup_vao() override;
|
|
|
|
void update_element_buffers() override;
|
|
}; |