2018-09-15 01:29:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
2018-09-19 07:52:42 +00:00
|
|
|
#include "BasicTypes.h"
|
2018-10-14 04:52:32 +00:00
|
|
|
#include "PoseableBatch.h"
|
2018-09-15 01:29:05 +00:00
|
|
|
|
|
|
|
namespace charcoal
|
|
|
|
{
|
|
|
|
namespace builtin
|
|
|
|
{
|
2018-09-19 07:52:42 +00:00
|
|
|
namespace basic
|
2018-09-15 01:29:05 +00:00
|
|
|
{
|
2018-10-14 04:52:32 +00:00
|
|
|
class Batch : public PoseableBatch<Vertex, Index, 1>
|
2018-09-19 07:52:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-10-14 04:52:32 +00:00
|
|
|
using PoseableBatch<Vertex, Index, 1>::PoseableBatch;
|
2018-09-19 07:52:42 +00:00
|
|
|
protected:
|
2018-10-14 19:44:04 +00:00
|
|
|
void setup_vao_vertex() override
|
|
|
|
{
|
|
|
|
glBindBuffer(GL_ARRAY_BUFFER, m_vertex_vbo);
|
2018-10-15 01:19:38 +00:00
|
|
|
|
2018-10-14 19:44:04 +00:00
|
|
|
glEnableVertexAttribArray(0);
|
2018-10-15 01:19:38 +00:00
|
|
|
|
2018-10-14 19:44:04 +00:00
|
|
|
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), NULL);
|
|
|
|
|
|
|
|
glVertexAttribDivisor(0, 0);
|
|
|
|
}
|
2018-09-19 07:52:42 +00:00
|
|
|
};
|
|
|
|
}
|
2018-09-15 01:29:05 +00:00
|
|
|
}
|
|
|
|
}
|