2018-09-05 15:47:09 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-09-05 20:26:50 +00:00
|
|
|
#include "stdafx.h"
|
|
|
|
|
2018-09-05 15:47:09 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "ShaderProgram.h"
|
|
|
|
|
2018-09-05 20:26:50 +00:00
|
|
|
template <typename RenderableType>
|
2018-09-05 15:47:09 +00:00
|
|
|
class Batch
|
|
|
|
{
|
|
|
|
public:
|
2018-09-05 20:26:50 +00:00
|
|
|
void init()
|
|
|
|
{
|
|
|
|
populate_vbos();
|
|
|
|
setup_vao();
|
|
|
|
}
|
2018-09-05 15:47:09 +00:00
|
|
|
|
2018-09-05 20:26:50 +00:00
|
|
|
virtual void render() const = 0;
|
2018-09-05 15:47:09 +00:00
|
|
|
|
2018-09-05 20:26:50 +00:00
|
|
|
protected:
|
|
|
|
virtual void populate_vbos() = 0;
|
|
|
|
virtual void setup_vao() = 0;
|
2018-09-05 15:47:09 +00:00
|
|
|
};
|