2020-08-30 16:35:45 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "VoxelProgram.hpp"
|
|
|
|
|
|
|
|
namespace pass {
|
|
|
|
/// Instanced voxels pass
|
|
|
|
class EntityProgram: public VoxelProgram {
|
|
|
|
public:
|
|
|
|
EntityProgram(const options &opts);
|
|
|
|
~EntityProgram();
|
|
|
|
|
|
|
|
static constexpr auto LOCATION = 6;
|
|
|
|
|
2020-09-26 22:05:43 +00:00
|
|
|
buffer::params setup(render::gl::Renderer *, const std::vector<glm::mat4> &modelsMatrices);
|
2020-08-30 16:35:45 +00:00
|
|
|
void disable();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void setModels(const GLfloat *matrices, size_t count);
|
|
|
|
|
|
|
|
private:
|
2020-09-03 17:33:39 +00:00
|
|
|
GLuint ModelsBufferID = 0;
|
|
|
|
size_t ModelBufferSize = 0;
|
2020-08-30 16:35:45 +00:00
|
|
|
};
|
|
|
|
}
|