40617c8953
to specify the batch pipeline specified at StackOverflow See https://stackoverflow.com/questions/8923174/opengl-vao-best-practices#8923298
20 lines
491 B
C++
20 lines
491 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "ShaderProgram.h"
|
|
#include "Renderable.h"
|
|
|
|
template <typename VertexType, typename IndexType>
|
|
class Batch
|
|
{
|
|
public:
|
|
Batch(ShaderProgram* p_shader_program, const std::vector<Renderable<VertexType, IndexType>*>& p_renderables);
|
|
|
|
virtual void init() = 0; // Maybe make this automatic? Or in the constructor?
|
|
virtual void render() = 0;
|
|
|
|
private:
|
|
ShaderProgram* m_p_shader_program;
|
|
std::vector<Renderable<VertexType, IndexType>*> m_p_renderables;
|
|
}; |